Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to access the chains of the chain complex of a simplex?

I have a simplicial complex and I want to get the chains of its chain complex. I have the following code:

S = SimplicialComplex([[1,2],[1,3],[1,4],[2,3],[2,4]])
print(S.chain_complex().homology(generators=True)[1][0][1])

It prints:

Chain(1:(1, 0, -1, 0, 1))

which is one of the chains of dimension one. It is of type

 <class 'sage.homology.chain_com`enter code here`plex.ChainComplex_class_with_category.element_class'>

How do I access the list of numbers (1, 0, -1, 0, 1) of this chain?

Thanks in advance.

How to access the chains of the chain complex of a simplex?

I have a simplicial complex and I want to get the chains of its chain complex. I have the following code:

S = SimplicialComplex([[1,2],[1,3],[1,4],[2,3],[2,4]])
print(S.chain_complex().homology(generators=True)[1][0][1])

It prints:

Chain(1:(1, 0, -1, 0, 1))

which is one of the chains of dimension one. It is of type

 <class 'sage.homology.chain_com`enter code here`plex.ChainComplex_class_with_category.element_class'>

How do I access the list of numbers (1, 0, -1, 0, 1) 1) of this chain?

Thanks in advance.