#18972: twographs and Seidel switching
-------------------------------------+-------------------------------------
       Reporter:  dimpase            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.9
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:  Nathann Cohen
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dimpase/seidelsw                 |  1b7f6b99019699fdccb4bb9afa86315defc87994
   Dependencies:  #18960, #18948,    |     Stopgaps:
  #18988, #18991                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 > I don't get it. Somewhere deep inside `Graph` there must be a fast way
 to check if two vertices are adjacent...

 `Graph.has_edge`.

 > I took it as `self.neighbour(j)` is actually something that takes
 constant time to invoke.

 It returns a list.

 > If not, pray tell me how to check that two vertices are adjacent in a
 reasonably fast way.

 The right way to write this code is NOT to test for adjacency. Use
 `seidel_switching`, it takes a couple of lines at most.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/18972#comment:56>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to