11#ifndef INCLUDE_RIPS_COMPLEX_INTERFACE_H_
12#define INCLUDE_RIPS_COMPLEX_INTERFACE_H_
14#include <gudhi/Simplex_tree.h>
15#include <gudhi/Rips_complex.h>
16#include <gudhi/Sparse_rips_complex.h>
19#include <boost/optional.hpp>
21#include "Simplex_tree_interface.h"
30namespace rips_complex {
32class Rips_complex_interface {
33 using Point_d = std::vector<double>;
34 using Distance_matrix = std::vector<std::vector<Simplex_tree_interface<>::Filtration_value>>;
37 void init_points(
const std::vector<std::vector<double>>& points,
double threshold) {
40 void init_matrix(
const std::vector<std::vector<double>>& matrix,
double threshold) {
41 rips_complex_.emplace(matrix, threshold);
44 void init_points_sparse(
const std::vector<std::vector<double>>& points,
double threshold,
double epsilon) {
45 sparse_rips_complex_.emplace(points,
Gudhi::Euclidean_distance(), epsilon, -std::numeric_limits<double>::infinity(), threshold);
47 void init_matrix_sparse(
const std::vector<std::vector<double>>& matrix,
double threshold,
double epsilon) {
48 sparse_rips_complex_.emplace(matrix, epsilon, -std::numeric_limits<double>::infinity(), threshold);
51 void create_simplex_tree(Simplex_tree_interface<>* simplex_tree,
int dim_max) {
53 rips_complex_->create_complex(*simplex_tree, dim_max);
55 sparse_rips_complex_->create_complex(*simplex_tree, dim_max);
61 boost::optional<Rips_complex<Simplex_tree_interface<>::Filtration_value>> rips_complex_;
62 boost::optional<Sparse_rips_complex<Simplex_tree_interface<>::Filtration_value>> sparse_rips_complex_;
Compute the Euclidean distance between two Points given by a range of coordinates....
Definition: distance_functions.h:34
Global distance functions.