permaviss.persistence_algebra.module_persistence_homology

module_persistence_homology.py

This module implements the persistence module homology

Functions

module_persistence_homology(D, Base, p) Given the differentials of a chain of tame persistence modules, we compute barcode bases for the homology of the chain.
quotient(M, N, p) Assuming that N generates a submodule of M, we compute a barcode basis for the quotient M / N.
permaviss.persistence_algebra.module_persistence_homology._pivot(l)[source]

Given a 1D array of integers, return the index of the last nonzero entry.

Parameters:l (list) – 1D array of integers.
Returns:Index of last nonzero entry. If l is zero, returns -1.
Return type:int
permaviss.persistence_algebra.module_persistence_homology.module_persistence_homology(D, Base, p)[source]

Given the differentials of a chain of tame persistence modules, we compute barcode bases for the homology of the chain.

Parameters:
  • D (list(Numpy Array)) – List of differentials of the chain complex.
  • Base (Numpy Array) – List containing barcode bases for each dimension
  • p (int(prime)) – Prime number to perform arithmetic mod p
Returns:

  • Hom (list(barcode_basis)) – Cycles mod boundaries of differentials, starting with: birth rad, death rad. If a cycle does not die we put max_rad as death radius.
  • Im (list(barcode_basis)) – List storing bases for the images of differentials
  • PreIm (list(Numpy Array)) – List storing bases for the preimages of the differentials. That is, which generators produce each image generator. This leads to how to go back from boundaries to preimages.

permaviss.persistence_algebra.module_persistence_homology.quotient(M, N, p)[source]

Assuming that N generates a submodule of M, we compute a barcode basis for the quotient M / N.

Parameters:
  • M (barcode_basis) – Basis for module
  • N (barcode_basis) – Basis for submodule of N
  • p (int(prime)) –
Returns:

Q – Barcode basis for the quotient M / N

Return type:

barcode_basis