Ticket #9930: trac_9930.patch

File trac_9930.patch, 1.3 KB (added by ncohen, 10 years ago)
  • sage/graphs/graph.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1284711349 -7200
    # Node ID 41683cf9f3d151c02d628f8a12289fa993722532
    # Parent  1d2358ac1804797838cd25182d5c88ea97bf0eec
    trac 9930 - Additional test in is_even_hole_free
    
    diff -r 1d2358ac1804 -r 41683cf9f3d1 sage/graphs/graph.py
    a b  
    13541354            sage: print "Everything is Fine !"
    13551355            Everything is Fine !
    13561356
     1357        TESTS:
     1358
     1359        Bug reported in #9925, and fixed by #9420::
     1360
     1361            sage: g = Graph(':SiBFGaCEF_@CE`DEGH`CEFGaCDGaCDEHaDEF`CEH`ABCDEF')
     1362            sage: g.is_even_hole_free()
     1363            False
     1364            sage: g.is_even_hole_free(certificate = True)
     1365            Subgraph of (): Looped multi-graph on 4 vertices
     1366
     1367        Making sure there are no other counter-examples around ::
     1368
     1369            sage: t = lambda x : (Graph(x).is_forest() or
     1370            ...         isinstance(Graph(x).is_even_hole_free(certificate = True),Graph))
     1371            sage: all( t(graphs.RandomBipartite(10,10,.5)) for i in range(100) )
     1372            True
     1373
    13571374        REFERENCE:
    13581375
    13591376        .. [ABCHRS08] L. Addario-Berry, M. Chudnovsky, F. Havet, B. Reed, P. Seymour