Ticket #10310: trac_10310-smallfix.patch

File trac_10310-smallfix.patch, 1.3 KB (added by ncohen, 9 years ago)
  • sage/graphs/graph_generators.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1290586657 -3600
    # Node ID 298f330e4765433dbab265279d3dd78da4efe47e
    # Parent  b5d85a06a41775ad34db4d0d07efae448b9372b6
    trac 10310 - use is_regular instead of redefining it in the docstring of the Brinkmann graph generator, and adding a doctest to check the automorphism group
    
    diff -r b5d85a06a417 -r 298f330e4765 sage/graphs/graph_generators.py
    a b  
    21582158            21
    21592159            sage: G.size()
    21602160            42
    2161             sage: def is_4regular(G):
    2162             ...       D = G.degree_sequence()
    2163             ...       return all(d == 4 for d in D)
    2164             sage: is_4regular(G)
     2161            sage: G.is_regular(4)
    21652162            True
    21662163
    21672164        It is an Eulerian graph with radius 3, diameter 3, and girth 5. ::
     
    21812178            True
    21822179            sage: G.chromatic_number()
    21832180            4
     2181
     2182        Its automorphism group is isomorphic to `D_7`::
     2183
     2184            sage: ag = G.automorphism_group()
     2185            sage: ag.is_isomorphic(DihedralGroup(7))
     2186            True
    21842187        """
    21852188        edge_dict = {
    21862189            0: [2,5,7,13],