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 class 'array'
cubical(dataset, threshold = 9999, method = "lj", ...)
# S3 method for class 'matrix'
cubical(dataset, ...)
object on which to calculate persistent homology
other relevant parameters
maximum simplicial complex diameter to explore
either "lj"
(for Link Join) or "cp"
(for Compute Pairs);
see Kaji et al. (2020) https://arxiv.org/abs/2005.12692 for details
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
.