Homology Functions
Regular Homology
ConleyDynamics.homology
— Functionhomology(lc::LefschetzComplex)
Compute the homology of a Lefschetz complex.
The homology is returned as a vector betti
of Betti numbers, where betti[k]
is the Betti number in dimension k-1
. The computations are performed over the field associated with the Lefschetz complex boundary matrix.
ConleyDynamics.relative_homology
— Functionrelative_homology(lc::LefschetzComplex,subc::Cells)
Compute the relative homology of a Lefschetz complex with respect to a subcomplex. The computation is performed over the field associated with the Lefschetz boundary matrix.
The subcomplex is the closure of the cells in subc
, which can be given either as indices or labels. The homology is returned as a vector betti
of Betti numbers, where betti[k]
is the Betti number in dimension k-1
.
relative_homology(lc::LefschetzComplex,subc::Cells,subc0::Cells)
Compute the relative homology of a Lefschetz complex with respect to a subcomplex. The computation is performed over the field associated with the Lefschetz boundary matrix.
In this implementation, relative homology of the pair cl(subc), cl(subc0))
is computed. An error is raised if cl(subc0)
is not a subset of cl(subc)
. The homology is returned as a vector betti
of Betti numbers, where betti[k]
is the Betti number in dimension k-1
.
Persistent Homology
ConleyDynamics.persistent_homology
— Functionpersistent_homology(lc::LefschetzComplex, filtration::Vector{Int})
Complete the persistent homology of a Lefschetz complex filtration over the field associated with the Lefschetz complex boundary matrix.
The function returns the two values
phsingles::Vector{Vector{Int}}
phpairs::Vector{Vector{Tuple{Int,Int}}}
It assumes that the order given by the filtration values is admissible, i.e., the permuted boundary matrix is strictly upper triangular. The function returns the starting filtration values for infinite length persistence intervals in phsingles
, and the birth- and death-filtration values for finite length persistence intervals in phpairs
.
Reduction Algorithm
ConleyDynamics.ph_reduce!
— Functionph_reduce!(matrix::SparseMatrix; [returnbasis=true])
Apply the persistence reduction algorithm to the matrix.
The function returns the values
phsingles::Vector{Vector{Int}}
phpairs::Vector{Vector{Tuple{Int,Int}}}
basis::SparseMatrix
(ifreturnbasis=true
)
It assumes that matrix
is strictly upper triangular. The function returns the starting columns for infinite length persistence intervals in phsingles
, and the birth- and death-columns for finite length persistence intervals in phpairs
. If the optional argument returnbasis=true
is given, then the function also returns the computed basis matrix B with reduced = matrix * B
.