#18564: Boost Edge Connectivity
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:  borassi
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.8
      Component:  graph theory       |   Resolution:
       Keywords:  Boost,             |    Merged in:
  connectivity                       |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  b0ca92c0674f7fe4df454566208e3f69d5faf982
  u/borassi/boost_edge_connectivity  |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Hellooooo Michele,

 Great work, thank you very much! If we can speedup several Sage functions
 the
 way you did for edge connectivity, the future looks bright `:-P`

 I have been trying to avoid the creation of these two .cpp/.hpp files, but
 no
 good new for the moment. I sent a question on cython-users [1], let's pray
 for
 their wisdom. If there is no better way to do it than write cpp code, then
 perhaps it will be better to 'patch' boost when it is installed, and only
 add
 the couple of lines we need? We'll see this later, after they have had the
 time
 to answer.

 About your code:

 - You add 'copyright' headers with a name which isn't yours: that's
 neither fair
   to Robert Miller nor to yourself! If you want your files to have a
 copyright
   header, please make it contain your name. Oh, and please steal a more
 recent
   header, for this one is a bit old. I think this one is the most recent
   {{{
 #*****************************************************************************
   #       Copyright (C) 2015 Michele Borassi <email_adress>
   #
   #  Distributed under the terms of the GNU General Public License (GPL)
   #  as published by the Free Software Foundation; either version 2 of
   #  the License, or (at your option) any later version.
   #                  http://www.gnu.org/licenses/
 #*****************************************************************************
   }}}

 - I do not think that having a `Graph.to_boost_graph` makes much sense: at
   user-level, having a 'boost' graph does not have much interest as it
 only has
   very few commands to add edges/vertices, and your `edge_connectivity`
   function. It would make more sense to keep this function inside of
   `boost_graph.pyx`, for internal use.

 - You should modify `GenericGraph.edge_connectivity` to make it able to
 call
   your function. Beware: this function applies to both directed and
 undirected
   graphs, while apparently your function only handles undirected graphs.
 The
   ideal, of course, would be to be able to call boost in both situations.

   Many graph function make several implementations available, and for
 instance
   `GenericGraph.automorphism_group`.

 - Every function that you add must be documented. Besides, it would be
 cool to
   add your new file to the doc index [2].

 - Every function must contain doctests.
   {{{
 (tmp|✚3)~/sage/graphs/base$ sage -coverage boost_graph.pyx
 ------------------------------------------------------------------------
 SCORE boost_graph.pyx: 0.0% (0 of 6)

 Missing documentation:
     * line 57: def __cinit__(self)
     * line 62: def add_vertex(self)
     * line 65: def add_edge(self, u, v)
     * line 68: def num_vertices(self)
     * line 71: def num_edges(self)
     * line 74: def edge_connectivity(self)
 ------------------------------------------------------------------------
   }}}

 Thank you very much for this improvement. That's no small speedup, and an
 important function.

 Nathann

 PS: Set the ticket's status to 'needs_review' when you want somebody to
 look at it.

 [1] https://groups.google.com/d/topic/cython-users/ICRgCWVZ6RQ/discussion
 [2] http://doc.sagemath.org/html/en/developer/sage_manuals.html#adding-a
 -new-file

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