|
254 | 254 |
|
255 | 255 | import copy |
256 | 256 |
|
257 | | -from sage.graphs.graph import Graph |
258 | 257 | from sage.matrix.constructor import matrix |
259 | 258 | from sage.misc.cachefunc import cached_method |
260 | 259 | from sage.misc.fast_methods import WithEqualityById |
|
263 | 262 | from sage.rings.rational_field import QQ |
264 | 263 | from sage.structure.parent import Parent |
265 | 264 | from sage.structure.sage_object import SageObject |
266 | | -from sage.homology.algebraic_topological_model import algebraic_topological_model_delta_complex |
267 | | -from sage.homology.chain_complex import ChainComplex |
268 | | -from sage.homology.chains import Chains, Cochains |
269 | 265 |
|
270 | 266 | from .cell_complex import GenericCellComplex |
271 | 267 | from .delta_complex import DeltaComplex |
@@ -1686,6 +1682,8 @@ def graph(self): |
1686 | 1682 | sage: Sigma3.nerve().is_connected() |
1687 | 1683 | True |
1688 | 1684 | """ |
| 1685 | + from sage.graphs.graph import Graph |
| 1686 | + |
1689 | 1687 | G = Graph(loops=True, multiedges=True) |
1690 | 1688 | for e in self.n_cells(1): |
1691 | 1689 | G.add_edge(self.face(e,0), self.face(e,1), e) |
@@ -2153,6 +2151,9 @@ def n_chains(self, n, base_ring=ZZ, cochains=False): |
2153 | 2151 | return GenericCellComplex.n_chains(self, n=n, |
2154 | 2152 | base_ring=base_ring, |
2155 | 2153 | cochains=cochains) |
| 2154 | + |
| 2155 | + from sage.homology.chains import Chains, Cochains |
| 2156 | + |
2156 | 2157 | n_cells = tuple(self.n_cells(n)) |
2157 | 2158 | if cochains: |
2158 | 2159 | return Cochains(self, n, n_cells, base_ring) |
@@ -3634,6 +3635,8 @@ def chain_complex(self, dimensions=None, base_ring=ZZ, augmented=False, |
3634 | 3635 | sage: RP2.cohomology(base_ring=GF(2)) == SimplicialSet(RP2).cohomology(base_ring=GF(2)) |
3635 | 3636 | True |
3636 | 3637 | """ |
| 3638 | + from sage.homology.chain_complex import ChainComplex |
| 3639 | + |
3637 | 3640 | if dimensions is None: |
3638 | 3641 | if not self.cells(): # Empty |
3639 | 3642 | if cochain: |
@@ -3782,6 +3785,8 @@ def algebraic_topological_model(self, base_ring=None): |
3782 | 3785 | 1: Vector space of dimension 2 over Rational Field, |
3783 | 3786 | 2: Vector space of dimension 1 over Rational Field} |
3784 | 3787 | """ |
| 3788 | + from sage.homology.algebraic_topological_model import algebraic_topological_model_delta_complex |
| 3789 | + |
3785 | 3790 | if base_ring is None: |
3786 | 3791 | base_ring = QQ |
3787 | 3792 | return algebraic_topological_model_delta_complex(self, base_ring) |
|
0 commit comments