The following classes and functions live in the dionysus
module.
an abstract simplex
test whether the simplex contains given vertex
access i-th vertex
iterator over the vertices
simplex cardinality
returns iterator over the boundary of the simplex
access the data associated to the simplex
simplex dimension, one less than cardinality
join a simplex and a vertex
store an ordered sequence of simplices, providing lookup
test whether filtration contains the simplex
access the simplex at the given index
iterate over the simplices in sorted order
size of the filtration
append simplex to the filtration, if not already in the filtration; either way return the index of the simplex
append simplex to the filtration
find the ordered index of a simplex in the filtration
rearrange simplices into the given order
Overloaded function.
sort(self: dionysus._dionysus.Filtration, reverse: bool = False) -> None
sort the filtration with respect to data, breaking ties using dimension, and then lexicographically
sort(self: dionysus._dionysus.Filtration, cmp: Callable[[dionysus._dionysus.Simplex, dionysus._dionysus.Simplex], int], reverse: bool = False) -> None
sort the filtration with respect to the given functor
returns (sorted) filtration filled with the k-skeleton of the clique complex built on the points at distance at most r from each other
Compute the k-skeleton of the closure of the list of simplices.
returns (sorted) lower-star (or upper-star if reverse = True
) filtration filled with the Freudenthal triangulation of the grid in the array data
Overloaded function.
homology_persistence(filtration: dionysus._dionysus.Filtration, prime: int = 2, method: str = ‘clearing’, progress: bool = False) -> dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>
compute homology persistence of the filtration (pair simplices); method is one of clearing, row, column, or column_no_negative
homology_persistence(filtration: dionysus::MatrixFiltration<dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>, float>, prime: int = 2, method: str = ‘clearing’, progress: bool = False) -> dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>
compute homology persistence of the filtration (pair simplices); method is one of clearing, row, column, or column_no_negative
homology_persistence(filtration: dionysus._dionysus.Filtration, relative: dionysus._dionysus.Filtration, prime: int = 2, method: str = ‘clearing’, progress: bool = False) -> dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>
compute homology persistence of the filtration, relative to a subcomplex; method is one of clearing, row, column, or column_no_negative
compute cohomology persistence of the filtration
Overloaded function.
omnifield_homology_persistence(filtration: dionysus._dionysus.Filtration) -> dionysus::OmniFieldPersistence<unsigned int, std::less<unsigned int>, dionysus::Q<long>, dionysus::ZpField<long> >
compute homology persistence of the filtration (pair simplices) over all fields at once
omnifield_homology_persistence(filtration: dionysus._dionysus.MatrixFiltration) -> dionysus::OmniFieldPersistence<unsigned int, std::less<unsigned int>, dionysus::Q<long>, dionysus::ZpField<long> >
compute homology persistence of the matrix filtration over all fields at once
compute zigzag homology persistence of the filtration with respect to the given times
filtration – an instance of Filtration
with the set of simplices used in the zigzag construction
times – a list of lists; the outer list runs parallel with the filtration; the inner list specifies for each simplex when it enters and leaves the zigzag (even entries, starting the indexing from 0, are interpreted as appearance times, odd entires as disappearance)
prime – prime modulo which to perform computation
callback – function to call after every step in the zigzag; it gets arguments (i,t,d,zz,cells),
where i is the index of the simplex being added or removed, t is the time,
d is the “direction” (True if the simplex is being added, False if it`s being removed),
zz is the current state of the ZigzagPersistence
,
cells is the map from the internal indices of the zigzag representation to the filtration indices,
progress – show a progress bar.
A triple. The first element is an instance of
ZigzagPersistence
, which offers access to the cycles
alive at the end of the zigzag; the second is a list of
persistence diagrams; the third is an instance of
TimeIndexMap
for translating cycles
from the internal representation to filtration indices.
Overloaded function.
init_diagrams(m: dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>, f: dionysus._dionysus.Filtration) -> List[dionysus::Diagram<float, unsigned int>]
initialize diagrams from reduced matrix and filtration
init_diagrams(m: dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>, f: dionysus::MatrixFiltration<dionysus::ReducedMatrix<dionysus::ZpField<long>, unsigned int, std::less<unsigned int>>, float>) -> List[dionysus::Diagram<float, unsigned int>]
initialize diagrams from reduced matrix and filtration
init_diagrams(m: dionysus::PairChainRecorder<dionysus::CohomologyPersistence<dionysus::ZpField<long>, unsigned int, std::less<unsigned int> > >, f: dionysus._dionysus.Filtration) -> List[dionysus::Diagram<float, unsigned int>]
initialize diagrams from cohomology persistence and filtration
init_diagrams(ofp: dionysus::OmniFieldPersistence<unsigned int, std::less<unsigned int>, dionysus::Q<long>, dionysus::ZpField<long> >, f: dionysus._dionysus.Filtration, p: int) -> List[dionysus::Diagram<float, unsigned int>]
initialize diagrams for a specific prime from omnifield persistence and filtration
init_diagrams(ofp: dionysus::OmniFieldPersistence<unsigned int, std::less<unsigned int>, dionysus::Q<long>, dionysus::ZpField<long> >, f: dionysus._dionysus.MatrixFiltration, p: int) -> List[dionysus::Diagram<float, unsigned int>]
initialize diagrams for a specific prime from omnifield persistence and filtration
persistence diagram
iterate over the points of the diagram
size of the diagram
Overloaded function.
append(self: dionysus._dionysus.Diagram, p: dionysus::Diagram<float, unsigned int>::Point) -> None
append point to the diagram
append(self: dionysus._dionysus.Diagram, birth: float, death: float) -> None
append point to the diagram
persistence diagram point
birth value
auxiliary data associated to the point (e.g., birth index)
death value
compute Wasserstein distance between two persistence diagrams
compute bottleneck distance between two persistence diagrams
chain of indices (formal sum with coefficients in Zp)
equality comparison
access the entry at a given index
iterate over the entries of the chain
size of the chain
nonequal comparison
(coefficient, index) entry in a chain)
coefficient of the chain element
index of the chain element
matrix, where each column has a lowest non-zero entry in a unique row; supports iteration and indexing
access the column at a given index
iterate over the columns of the matrix
size of the matrix
test if two cycles are homologous
pair of the given index
index representing lack of pair
compact composition of multiple reduced matrices
size of the persistence object
Overloaded function.
column(self: dionysus._dionysus.OmniFieldPersistence, arg0: int, arg1: int) -> dionysus._dionysus.Chain
get the column over a specific prime
column(self: dionysus._dionysus.OmniFieldPersistence, arg0: int) -> std::vector<dionysus::ChainEntry<dionysus::Q<long>, unsigned int>, std::allocator<dionysus::ChainEntry<dionysus::Q<long>, unsigned int> > >
get the column over rationals
primes over which the matrix differs from the rest
test whether the column has a special value over the given prime
get dictionary of special columns mapping to primes
chain of indices (formal sum with coefficients in Zp)
equality comparison
access the entry at a given index
iterate over the entries of the chain
size of the chain
nonequal comparison
(coefficient, index) entry in a chain)
coefficient of the chain element
index of the chain element
Wrapper around columns in CohomologyPersistence.
still alive cocycle
index when the column was added
representation of pairs and alive cocycles
iterate over the column heads of the matrix
size of the matrix
cocycle that died with the addition of the cell at the given index
pair of the given index
index representing lack of pair
representation of the current homology basis
iterator over the alive cycles
number of alive cycles
arithmetic mod p
The following functions live in dionysus.plot
module.
Plot the persistence diagram.
dgm (Diagram) – See for example init_diagrams.
show (bool) – Display the plot. (Default: False)
labels (bool) – Set axis labels. (Default: False)
ax (AxesSubplot) – Axes that should be used for plotting (Default: None)
pt_style (dict) – argments passed to ax.scatter for style of points.
line_style (dict) – argments passed to ax.plot for style of diagonal line.
Plot the barcode.
dgm (Diagram) – See for example init_diagrams.
order (str) – How to sort the bars, either ‘death’ or ‘birth’ (Default: ‘birth’)
show (bool) – Display the plot. (Default: False)
ax (AxesSubplot) – Axes that should be used for plotting (Default: None)
**bar_style – Arguments passed to ax.plot for style of the bars. (Defaults: color=’b’)
Plot the histogram of point density.
dgm (Diagram) – See for example init_diagrams.
bins (int) – bins for histogram, see ax.hist2d (Default: 200)
lognorm (bool) – Use logarithmic norm (Default: True)
diagonal (bool) – (Default: True)
show (bool) – Display the plot. (Default: False)
labels (bool) – Set axis labels. (Default: False)
ax (AxesSubplot) – Axes that should be used for plotting (Default: None)
**hist_style – Arguments passed to ax.hist2d for style of the histogram. (Defaults: bins=200)
Check if filtration is simplicial. If report = True, output the problems.