11 #ifndef INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_
12 #define INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_
14 #include <gudhi/Simplex_tree.h>
15 #include <gudhi/Euclidean_strong_witness_complex.h>
17 #include "Simplex_tree_interface.h"
19 #include <CGAL/Epick_d.h>
28 namespace witness_complex {
31 class Euclidean_strong_witness_complex_interface {
32 using Dynamic_kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >;
33 using Point_d = Dynamic_kernel::Point_d;
38 Euclidean_strong_witness_complex_interface(
const std::vector<std::vector<double>>& landmarks,
39 const std::vector<std::vector<double>>& witnesses) {
40 landmarks_.reserve(landmarks.size());
41 for (
auto& landmark : landmarks)
42 landmarks_.emplace_back(landmark.begin(), landmark.end());
43 witness_complex_ =
new Euclidean_strong_witness_complex<Dynamic_kernel>(landmarks_, witnesses);
46 ~Euclidean_strong_witness_complex_interface() {
47 delete witness_complex_;
51 std::size_t limit_dimension) {
52 witness_complex_->create_complex(*simplex_tree, max_alpha_square, limit_dimension);
56 witness_complex_->create_complex(*simplex_tree, max_alpha_square);
59 std::vector<double> get_point(
unsigned vh) {
60 std::vector<double> vd;
61 if (vh < landmarks_.size()) {
62 Point_d ph = witness_complex_->get_point(vh);
63 for (
auto coord = ph.cartesian_begin(); coord < ph.cartesian_end(); coord++)
70 std::vector<Point_d> landmarks_;
71 Euclidean_strong_witness_complex<Dynamic_kernel>* witness_complex_;
Simplex Tree data structure for representing simplicial complexes.
Definition: Simplex_tree.h:75
Options::Simplex_key Simplex_key
Key associated to each simplex.
Definition: Simplex_tree.h:86