#7184: Implement counting of spanning trees for graphs and digraphs
----------------------------+-----------------------------------------------
   Reporter:  AJonsson      |       Owner:  rlm         
       Type:  enhancement   |      Status:  needs_review
   Priority:  major         |   Milestone:  sage-4.2    
  Component:  graph theory  |    Keywords:              
Work_issues:                |      Author:              
   Reviewer:                |      Merged:              
----------------------------+-----------------------------------------------

Comment(by ncohen):

 Sorryyyyyyy !! I had forgotten to edit your function after I edited
 kirchhoff_matrix !

 Here is a new patch removing this line which is now integrated into
 kirchhoff_matrix. Besides, I wanted to do something about
 {{{
                     for i in self.vertices():
                                 M[j,j]=self.in_degree(i)
                                 if (self.vertices()[j]== root_vertex):
                                     M[j,j]= M[j,j] + 1
                                 j= j + 1
 }}}
 With these lines, you are evaluating all the vertices at each look, just
 to return its jth element. As the vertices do not change, you could have
 stored the list of vertices in a variable, each time trying to find the
 jth element of this list ( without listing allt he vertices again ). But
 with this new patch, you are just getting the index of the vertex you are
 interested in, and updating the matrix... And with some luck, this patch
 is the last one :-)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7184#comment:14>
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 sage-trac@googlegroups.com
To unsubscribe from this group, send email to 
sage-trac+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to