# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1284710422 7200
# Node ID abe3cba1357cfbb9e38f40132f753f8568695720
# Parent 3fbed4e4f2911e9100ae50364d96c28946dcd981
trac 9925  Doctest error in sage/graphs/graph.py
diff r 3fbed4e4f291 r abe3cba1357c sage/graphs/graph.py
a

b


1337  1337  not a forest has an even hole:: 
1338  1338  
1339  1339  sage: g = graphs.RandomBipartite(10, 10, .5) 
1340   sage: g.is_even_hole_free() 
 1340  sage: g.is_even_hole_free() and not g.is_forest() 
1341  1341  False 
1342  1342  
1343  1343  We can check the certificate returned is indeed an even 
1344  1344  cycle:: 
1345  1345  
1346   sage: cycle = g.is_even_hole_free(certificate = True) 
1347   sage: cycle.order() % 2 == 0 
1348   True 
1349   sage: cycle.is_isomorphic(graphs.CycleGraph(cycle.order())) 
1350   True 
 1346  sage: if not g.is_forest(): 
 1347  ... cycle = g.is_even_hole_free(certificate = True) 
 1348  ... if cycle.order() % 2 == 1: 
 1349  ... print "Error !" 
 1350  ... if not cycle.is_isomorphic( 
 1351  ... graphs.CycleGraph(cycle.order())): 
 1352  ... print "Error !" 
 1353  ... 
 1354  sage: print "Everything is Fine !" 
 1355  Everything is Fine ! 
1351  1356  
1352  1357  REFERENCE: 
1353  1358  