#17711: Pre-processing for vertex separation
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dcoudert               |       Status:  needs_info
           Type:         |    Milestone:  sage-6.5
  enhancement            |   Resolution:
       Priority:  minor  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:  David  |  f62716539aaf4c236041d1e31dbf59bcb8bba750
  Coudert                |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/17711           |
   Dependencies:         |
  #17647                 |
-------------------------+-------------------------------------------------

Comment (by dcoudert):

 Replying to [comment:5 ncohen]:
 > Yooooooooooooo !
 >
 > Does the job, very few comments (and a small commit at `public/17711b`):
 >
 >
 > - Calling `is_strongly_connected` is very cheap while
 >   `g.strongly_connected_components_digraph` actually copies the whole
 graph
 >
 > {{{
 > sage: g=digraphs.DeBruijn(5,3)
 > sage: %timeit g.is_strongly_connected()
 > 10000 loops, best of 3: 129 µs per loop
 > sage: %timeit g.strongly_connected_components_digraph()
 > 1000 loops, best of 3: 1.31 ms per loop
 > }}}
 >
 >   Better to only copy it if necessary.
 >
 > - Is there any reason why you only deal with digraphs ? `Digraph(G)`
 (when `G`
 >   is a graph) is not always strongly connected: `G` may not be
 connected. The
 >   same code could handle everything at once, couldn't it ?
 So you propose that I
 1. test if the graph is connected. If not, then apply the algorithm on
 each connected component.
 2. If G is directed, test if is strongly connected. If not, then apply the
 algorithm on each scc

 Is that correct?


 > - (unrelated) what on earth is this `random_DAG` function doing in the
 global
 >   namespace instead of being in `digraphs.<tab>` ? `O_O`

 I had the same remark while reviewing patch #12181 (and certainly other
 tickets). Nothing has been done since. I don't even know where is the
 code.
 In fact, we have many random<TAB> stuff in global namespace...

 David.

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