Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Graphs """ #***************************************************************************** # Copyright (C) 2015 Travis Scrimshaw <tscrim at ucdavis.edu> # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #******************************************************************************
r""" The category of graphs.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs(); C Category of graphs
TESTS::
sage: TestSuite(C).run() """ def super_categories(self): """ EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: Graphs().super_categories() [Category of simplicial complexes] """
def vertices(self): """ Return the vertices of ``self``.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs().example() sage: C.vertices() [0, 1, 2, 3, 4] """
def edges(self): """ Return the edges of ``self``.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs().example() sage: C.edges() [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)] """
""" Return the dimension of ``self`` as a CW complex.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs().example() sage: C.dimension() 1 """ return 0
""" Return the facets of ``self``.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs().example() sage: C.facets() [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)] """
""" Return the faces of ``self``.
EXAMPLES::
sage: from sage.categories.graphs import Graphs sage: C = Graphs().example() sage: sorted(C.faces(), key=lambda x: (x.dimension(), x.value)) [0, 1, 2, 3, 4, (0, 1), (1, 2), (2, 3), (3, 4), (4, 0)] """
|