Ticket #10781: trac_10781-reviewer.patch

File trac_10781-reviewer.patch, 2.5 KB (added by ncohen, 11 years ago)
  • sage/graphs/graph_generators.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1299590088 -3600
    # Node ID 7c3d566411e2dc69f5ff9f9c56d67b5570769f27
    # Parent  3a67c2a91eeb21a93364f7caa9e8fe7945d4def6
    #10781 - Shrikhande graph to the common graphs database (reviewer patch)
    
    diff -r 3a67c2a91eeb -r 7c3d566411e2 sage/graphs/graph_generators.py
    a b  
    34863486        """
    34873487        Returns the Shrikhande graph.
    34883488
    3489         For more information, see `this MathWorld article on the Shrikhande graph <http://mathworld.wolfram.com/ShrikhandeGraph.html>`_ or
    3490         `this Wikipedia article <http://en.wikipedia.org/wiki/Shrikhande_graph>`_.
     3489        For more information, see `this MathWorld article on the Shrikhande
     3490        graph <http://mathworld.wolfram.com/ShrikhandeGraph.html>`_ or `this
     3491        Wikipedia article <http://en.wikipedia.org/wiki/Shrikhande_graph>`_.
    34913492
    34923493        EXAMPLES:
    34933494
    3494         The Shrikhande graph was defined by S. S. Shrikhande in 1959. It has 16 vertices and 48 edges, and is strongly regular of degree 6 with parameters (2,2)::
     3495        The Shrikhande graph was defined by S. S. Shrikhande in 1959. It has
     3496        `16` vertices and `48` edges, and is strongly regular of degree `6` with
     3497        parameters `(2,2)`::
    34953498           
    34963499            sage: G = graphs.ShrikhandeGraph(); G
    34973500            Shrikhande graph: Graph on 16 vertices
     
    35013504            48
    35023505            sage: G.is_regular(6)
    35033506            True
    3504             sage: set([len([x for x in G.neighbors(i) if x in G.neighbors(j)]) for i in range(G.order()) for j in range(i)])
     3507            sage: set([len([x for x in G.neighbors(i) if x in G.neighbors(j)])
     3508            ...         for i in range(G.order())
     3509            ...         for j in range(i)])
    35053510            set([2])
    35063511
    35073512        It is non-planar, and both Hamiltonian and Eulerian::
     
    35133518            sage: G.is_eulerian()
    35143519            True
    35153520
    3516         It has radius 2, diameter 2, and girth 3::
     3521        It has radius `2`, diameter `2`, and girth `3`::
    35173522           
    35183523            sage: G.radius()
    35193524            2
     
    35223527            sage: G.girth()
    35233528            3
    35243529
    3525         Its chromatic number is 4 and its automorphism group is of order 192::
     3530        Its chromatic number is `4` and its automorphism group is of order
     3531        `192`::
    35263532           
    35273533            sage: G.chromatic_number()
    35283534            4