Graphs

class sage.categories.graphs.Graphs(s=None)

Bases: sage.categories.category_singleton.Category_singleton

The category of graphs.

EXAMPLES:

sage: from sage.categories.graphs import Graphs
sage: C = Graphs(); C
Category of graphs
class ParentMethods
dimension()

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
edges()

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)]
faces()

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)]
facets()

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)]
vertices()

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]
super_categories()

EXAMPLES:

sage: from sage.categories.graphs import Graphs
sage: Graphs().super_categories()
[Category of simplicial complexes]