#13006: All-paths in a graph blows up when start and end are identical vertices
----------------------------+-----------------------------------------------
   Reporter:  rbeezer       |             Owner:  jason, ncohen, rlm
       Type:  defect        |            Status:  new               
   Priority:  minor         |         Milestone:  sage-5.1          
  Component:  graph theory  |          Keywords:  sd40.5            
Work issues:                |   Report Upstream:  N/A               
  Reviewers:                |           Authors:                    
  Merged in:                |      Dependencies:                    
   Stopgaps:                |  
----------------------------+-----------------------------------------------
 Seems to be a problem for digraphs also.

 {{{
 sage: G = graphs.CompleteGraph(4)
 sage: G.all_paths(2,2)
 ---------------------------------------------------------------------------
 IndexError                                Traceback (most recent call
 last)
 <snip>
   11495                     s=act_path_iter[-1].next()  # try to get the
 next neighbor/successor, ...
   11496                 except (StopIteration):         # ... if there is
 none ...
 <snip>
 IndexError: list index out of range
 }}}

 For this trivial situation, there is no "previous" iterator.  We could
 immediately return the trivial answer, or catch the exception, or place an
 empty iterator on the list.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13006>
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