This function is an R wrapper for the CubicalRipser C++ library to calculate
persistent homology. For more information on the C++ library, see
https://github.com/CubicalRipser. For more information on how objects of
different classes are evaluated by cubical
, read the Details section
below.
cubical(dataset, ...) # S3 method for array cubical(dataset, threshold = 9999, method = "lj", ...) # S3 method for matrix cubical(dataset, ...)
dataset | object on which to calculate persistent homology |
---|---|
... | other relevant parameters |
threshold | maximum simplicial complex diameter to explore |
method | either |
PHom
object
cubical.array
assumes dataset
is a lattice, with each element containing
the value of the lattice at the point represented by the indices of the
element in the array
.
cubical.matrix
is redundant for versions of R
at or after 4.0. For
previous versions of R
, in which objects with class matrix
do not
necessarily also have class array
, dataset
is converted to an array
and persistent homology is then calculated using cubical.array
.