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
""" Examples of CW complexes """ #***************************************************************************** # 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""" An example of a CW complex: a (2-dimensional) surface.
This class illustrates a minimal implementation of a CW complex.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example(); X An example of a CW complex: the surface given by the boundary map (1, 2, 1, 2)
sage: X.category() Category of finite finite dimensional CW complexes
We conclude by running systematic tests on this manifold::
sage: TestSuite(X).run() """ r""" EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example((1, 2)); X An example of a CW complex: the surface given by the boundary map (1, 2)
TESTS::
sage: TestSuite(X).run() """
r""" TESTS::
sage: from sage.categories.cw_complexes import CWComplexes sage: CWComplexes().example() An example of a CW complex: the surface given by the boundary map (1, 2, 1, 2) """
""" Return the cells of ``self``.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: C = X.cells() sage: sorted((d, C[d]) for d in C.keys()) [(0, (0-cell v,)), (1, (0-cell e1, 0-cell e2)), (2, (2-cell f,))] """
r""" Return an element of the CW complex, as per :meth:`Sets.ParentMethods.an_element`.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: X.an_element() 2-cell f """
""" A cell in a CW complex. """ """ Initialize ``self``.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: f = X.an_element() sage: TestSuite(f).run() """
""" Return a string representation of ``self``.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: X.an_element() 2-cell f """
""" Check equality.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: f = X.an_element() sage: f == X(2, 'f') True sage: e1 = X(1, 'e1') sage: e1 == f False """ and self.parent() is other.parent() and self._dim == other._dim and self._name == other._name)
""" Return the dimension of ``self``.
EXAMPLES::
sage: from sage.categories.cw_complexes import CWComplexes sage: X = CWComplexes().example() sage: f = X.an_element() sage: f.dimension() 2 """
|