#11584: DegreeSequences class !
-----------------------------+----------------------------------------------
   Reporter:  ncohen         |          Owner:  sage-combinat
       Type:  PLEASE CHANGE  |         Status:  needs_review 
   Priority:  major          |      Milestone:  sage-4.7.2   
  Component:  combinatorics  |       Keywords:               
Work_issues:                 |       Upstream:  N/A          
   Reviewer:                 |         Author:  Nathann Cohen
     Merged:                 |   Dependencies:               
-----------------------------+----------------------------------------------

Comment(by kcrisman):

 Interesting.  A long time ago I was hoping one could have Sage create more
 than one graph from a given degree sequence.  Currently we just have H-H
 in one way:
 {{{

     def DegreeSequence(self, deg_sequence):
         """
         Returns a graph with the given degree sequence. Raises a NetworkX
         error if the proposed degree sequence cannot be that of a graph.

         Graph returned is the one returned by the Havel-Hakimi algorithm,
         which constructs a simple graph by connecting vertices of highest
         degree to other vertices of highest degree, resorting the
 remaining
         vertices by degree and repeating the process. See Theorem 1.4 in
         [1].
 }}}
 {{{
         import networkx
         return graph.Graph(networkx.havel_hakimi_graph([int(i) for i in
 deg_sequence])
 }}}
 It would be great to be able to return all graphs created by this, at
 least it seems that way to me...

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