alphaComplexFiltration: Alpha Complex Filtration

View source: R/alphaComplexFiltration.R

alphaComplexFiltrationR Documentation

Alpha Complex Filtration

Description

The function alphaComplexFiltration computes the alpha complex filtration built on top of a point cloud.

Usage

alphaComplexFiltration(
    X, library = "GUDHI", printProgress = FALSE)

Arguments

X

an n by d matrix of coordinates, used by the function FUN, where n is the number of points stored in X and d is the dimension of the space.

library

a string specifying which library to compute the Alpha Complex filtration. The user can use the library "GUDHI", and is also the default value.

printProgress

if TRUE, a progress bar is printed. The default value is FALSE.

Details

The function alphaComplexFiltration constructs the alpha complex filtration, using the C++ library GUDHI. See refereneces.

Value

The function alphaComplexFiltration returns a list with the following elements:

cmplx

a list representing the complex. Its i-th element represents the vertices of i-th simplex.

values

a vector representing the filtration values. Its i-th element represents the filtration value of i-th simplex.

increasing

a logical variable indicating if the filtration values are in increasing order (TRUE) or in decreasing order (FALSE).

coordinates

a matrix representing the coordinates of vertices. Its i-th row represents the coordinate of i-th vertex.

Author(s)

Jisu Kim and Vincent Rouvreau

References

Edelsbrunner H, Harer J (2010). "Computational topology: an introduction." American Mathematical Society.

Rouvreau V (2015). "Alpha complex." In GUDHI User and Reference Manual. GUDHI Editorial Board. https://gudhi.inria.fr/doc/latest/group__alpha__complex.html

Edelsbrunner H, Kirkpatrick G, Seidel R (1983). "On the shape of a set of points in the plane." IEEE Trans. Inform. Theory.

Maria C (2014). "GUDHI, Simplicial Complexes and Persistent Homology Packages." https://project.inria.fr/gudhi/software/

See Also

alphaComplexDiag, filtrationDiag

Examples

# input data generated from a circle
X <- circleUnif(n = 10)

# alpha complex filtration
FltAlphaComplex <- alphaComplexFiltration(X = X, printProgress = TRUE)

# plot alpha complex filtration
lim <- rep(c(-1, 1), 2)
plot(NULL, type = "n", xlim = lim[1:2], ylim = lim[3:4],
    main = "Alpha Complex Filtration Plot")
for (idx in seq(along = FltAlphaComplex[["cmplx"]])) {
  polygon(FltAlphaComplex[["coordinates"]][FltAlphaComplex[["cmplx"]][[idx]], , drop = FALSE],
      col = "pink", border = NA, xlim = lim[1:2], ylim = lim[3:4])
}
for (idx in seq(along = FltAlphaComplex[["cmplx"]])) {
  polygon(FltAlphaComplex[["coordinates"]][FltAlphaComplex[["cmplx"]][[idx]], , drop = FALSE],
      col = NULL, xlim = lim[1:2], ylim = lim[3:4])
}  
points(FltAlphaComplex[["coordinates"]], pch = 16)

TDA documentation built on May 29, 2024, 1:28 a.m.