#9910: Longest path
----------------------------------------------+-----------------------------
   Reporter:  ncohen                          |       Owner:  jason, ncohen, rlm
       Type:  enhancement                     |      Status:  needs_review      
   Priority:  major                           |   Milestone:  sage-4.6.1        
  Component:  graph theory                    |    Keywords:                    
     Author:  Nathann Cohen                   |    Upstream:  N/A               
   Reviewer:  Robert Miller, Minh Van Nguyen  |      Merged:                    
Work_issues:                                  |  
----------------------------------------------+-----------------------------
Changes (by newvalueoldvalue):

  * reviewer:  => Robert Miller, Minh Van Nguyen
  * author:  => Nathann Cohen


Old description:

> This method computes a longest path in a graph/digraph...
>
> Apply after :
>
>     * #9698
>     * #10043
>
> Nathann

New description:

 This method computes a longest path in a graph/digraph...

 Apply after :

     * #9698
     * #10043

 '''Apply:'''

  1. [attachment:trac_9910.patch]
  1. [attachment:trac-9910_reviewer.patch]

--

Comment:

 I'm OK with most of your patch. But here are some general comments:

  * I don't quite understand this documentation:
 {{{
         - ``s`` (vertex) -- forces the source of the path. Set to
           ``None`` by default.

         - ``t`` (vertex) -- forces the destination of the path. Set to
           ``None`` by default.
 }}}
  What do you mean by "forces", etc. You need to elaborate here.

  * The following code block
 {{{
             if self._directed:
                 from sage.graphs.all import DiGraph
                 return [0, DiGraph()] if weighted else DiGraph()
             else:
                 from sage.graphs.all import Graph
                 return [0, Graph()] if weighted else Graph()
 }}}
  is equivalent to
 {{{
             if self._directed:
                 from sage.graphs.all import DiGraph
                 return [0, DiGraph()] if weighted else DiGraph()
             from sage.graphs.all import Graph
             return [0, Graph()] if weighted else Graph()
 }}}

  * You really need to start seriously writing Python code that conforms to
 Python coding conventions (wherever possible); see
 [http://www.python.org/dev/peps/pep-0008/ PEP 8] for more information.

 Most of the above issues are fixed in my reviewer patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9910#comment:7>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to