Ticket #1525: bipartite.patch

File bipartite.patch, 1.6 KB (added by rlm, 12 years ago)

Note that now these numbers are backed up by Sloane!

  • sage/graphs/graph_generators.py

    # HG changeset patch
    # User Robert L. Miller <rlmillster@gmail.com>
    # Date 1200268593 28800
    # Node ID 31f387d848361825086fc40c25821f8d666eb5a0
    # Parent  f3102578ea3e2e5e868df487c5c7bd46d979ff28
    Corrected doctests for generating bipartite graphs, due to NetworkX fix
    
    diff -r f3102578ea3e -r 31f387d84836 sage/graphs/graph_generators.py
    a b class GraphGenerators(): 
    27252725            45
    27262726       
    27272727        Generate all bipartite graphs on up to 7 vertices:
     2728        (see http://www.research.att.com/~njas/sequences/A033995)
    27282729            sage: L = list( graphs(7, lambda G: G.is_bipartite(), augment='vertices') )
    2729             sage: len(L)        #   random, due to NetworkX bug: see https://networkx.lanl.gov/ticket/132
    2730             133
     2730            sage: [len([g for g in L if g.order() == i]) for i in [1..7]]
     2731            [1, 2, 3, 7, 13, 35, 88]
    27312732
    27322733        Generate all bipartite graphs on exactly 8 vertices:
     2734        (see http://www.research.att.com/~njas/sequences/A033995)
    27332735            sage: L = list( graphs(8, lambda G: G.is_bipartite()) )
    2734             sage: len(L)        #   random, due to NetworkX bug: see https://networkx.lanl.gov/ticket/132
    2735             143
     2736            sage: len(L)
     2737            303
    27362738       
    2737         Sloane A000088:
     2739        Generate graphs on the fly:
     2740        (see http://www.research.att.com/~njas/sequences/A000088)
    27382741            sage: for i in range(0, 7):
    27392742            ...    print len(list(graphs(i)))
    27402743            1