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

Comment (by dimpase):

 Replying to [comment:28 ncohen]:
 > > > I already made comments on the code of `seidel_switching`,
 > > You said there that Graph.vertices() is a plain list, and I should
 > > make it a set, or something? (I guess a dictionary, as I need to know
 > > the original indices)
 > >
 > > It's a usual operation, find positions of vertices... E.g.
 > > how do you construct subgraphs without essentially doing this?
 >
 > I was refering to point 5 of [comment:1]. It contains code.
 >

 I changed `seidel_switching()` in the way you propose. As the function
 returns a new
 graph, I needed to use `deepcopy(self)` (`copy(self)` is not enough).
 Perhaps there is a better way...

 > > >and you need to document what a `twograph_descendant` is.
 > >
 > > it's the composition of two documented functions, isn't it enough?
 >
 > Neither `twograph_descendant` nor `TwoGraph.descendant` define what a
 descendant is.

 OK, oops, fixed in the next commit.

 >
 > > It is a hell of lot faster for cases with more than 100 vertices, say.
 `O(n^2)` vs `O(n^3)`.
 >
 > We have very fast functions in modules, too. For hyperbolicity, for
 vertex separation, for.. Well, a lot of things. It can be made much
 faster, however, if you rewrite it to use `seidel_switching` and rewrite
 `seidel_switching` with the code of [comment:1].
 >
 > > Did you see the
 
[http://git.sagemath.org/sage.git/diff/src/sage/graphs/generators/families.py?id=5115728f80aa95f87a272feec999e317ccdffba4&id2=edb1b0870d25373a1cf8def52c5fe3159245f59d
 patch for Chang graphs]? Do you think it is useless and should be removed?
 >
 > It is unrelated to my point: this is nice indeed, but it merely uses
 `seidel_switching`, and that's it.
 >
 OK, perhaps I misunderstood your point.

 > > I don't know how to rebuild the database, so that it is available as
 >
 > Look for {{{(275, 112, 30, 56)}}} in `strongly_regular_db.pyx`.
 OK, thx, fixed.


 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=c4269aeae44bbd64afbdee96f04fb120d73f0de1
 c4269ae]||{{{doc and srg DB fixes}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=449a23ec5b0305fc2f7132bdd38ba0923ec01b89
 449a23e]||{{{improving seidel_switching()}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/18972#comment:31>
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