Skip to contents

A Witness complex \(\mathrm{Wit}(W,L)\) is a simplicial complex defined on two sets of points in \(R^D\). The data structure is described in Boissonnat and Maria (2014) .

Details

The class constructs a (weak) witness complex for a given table of nearest landmarks with respect to witnesses.

References

Boissonnat J, Maria C (2014). “The simplex tree: An efficient data structure for general simplicial complexes.” Algorithmica, 70(3), 406--427.

See also

Other filtrations and reconstructions: AlphaComplex, RipsComplex, TangentialComplex

Author

Siargey Kachanovich

Super class

rgudhi::PythonClass -> WitnessComplex

Methods

Inherited methods


Method new()

The WitnessComplex constructor.

Usage

WitnessComplex$new(nearest_landmark_table)

Arguments

nearest_landmark_table

A list of tibble::tibbles specifying for each witness w, the ordered list of nearest landmarks with id in column nearest_landmark and distance to w in column distance.

Returns

A WitnessComplex object storing the Witness complex.


Method create_simplex_tree()

Usage

WitnessComplex$create_simplex_tree(max_alpha_square = Inf)

Arguments

max_alpha_square

The maximum relaxation parameter. Defaults to Inf.

Returns

A SimplexTree object storing the computed simplex tree created from the Delaunay triangulation.


Method clone()

The objects of this class are cloneable with this method.

Usage

WitnessComplex$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # reticulate::py_module_available("gudhi")
withr::with_seed(1234, {
  l <- list(
    tibble::tibble(
      nearest_landmark = sample.int(10),
      distance = sort(rexp(10))
    ),
    tibble::tibble(
      nearest_landmark = sample.int(10),
      distance = sort(rexp(10))
    )
  )
})
wc <- WitnessComplex$new(nearest_landmark_table = l)
wc
}
if (FALSE) { # reticulate::py_module_available("gudhi")
withr::with_seed(1234, {
  l <- list(
    tibble::tibble(
      nearest_landmark = sample.int(10),
      distance = sort(rexp(10))
    ),
    tibble::tibble(
      nearest_landmark = sample.int(10),
      distance = sort(rexp(10))
    )
  )
})
wc <- WitnessComplex$new(nearest_landmark_table = l)
st <- wc$create_simplex_tree()
st$num_vertices()
}