#18046: Graphs with multiedges and latex
-------------------------------------+-------------------------------------
       Reporter:  jclaas             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.6
      Component:  graph theory       |   Resolution:
       Keywords:  graph-theory,      |    Merged in:
  multiedges, latex, sd66            |    Reviewers:
        Authors:  Jacob Laas         |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  d2ebe228caee2da94ecee214bf7a8f52004228be
  u/jclaas/graphs_with_multiedges_and_latex|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Helloooooooooooo,

 Several coments:

 - Could you add to the doctests an example of a graph plot which uses the
 new
   feature you impplemented?

 - {{{if isinstance(x, list) and (not isinstance(x[0], number_types) or not
 x[0] >= 0.0):}}}

   This code only tests if the *first* element of the list is a positive.
 You
   should probably replace
   {{{x[0] >= 0.0}}}
   with
   {{{all(xx>=0 for xx in x)}}}

 - The previous test appears so often that it would be better to define a
   {{{is_positive_number=lambda x:isinstance(x, number_types) and x >=
 0.0}}} and
   use it everywhere.

 - In this block of code
   {{{
   reverse_index = len(edge_thickness) - (multiedge_index+1)
   edge_thickness = edge_thickness[reverse_index]
   }}}
   You should probably use the following Python trick
   {{{
   sage: a=[1,2,3,4,5,6]
   sage: a[-1]
   6
   sage: a[-4]
   3
   sage: a[-5]
   2
   sage: a[-6]
   1
   }}}

 Short of this the code looks good. Thanks,

 Nathann

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