# 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(): 
2725  2725  45 
2726  2726  
2727  2727  Generate all bipartite graphs on up to 7 vertices: 
 2728  (see http://www.research.att.com/~njas/sequences/A033995) 
2728  2729  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] 
2731  2732  
2732  2733  Generate all bipartite graphs on exactly 8 vertices: 
 2734  (see http://www.research.att.com/~njas/sequences/A033995) 
2733  2735  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 
2736  2738  
2737   Sloane A000088: 
 2739  Generate graphs on the fly: 
 2740  (see http://www.research.att.com/~njas/sequences/A000088) 
2738  2741  sage: for i in range(0, 7): 
2739  2742  ... print len(list(graphs(i))) 
2740  2743  1 