23 #ifndef INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_ 24 #define INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_ 26 #include <gudhi/Simplex_tree.h> 27 #include <gudhi/Euclidean_strong_witness_complex.h> 29 #include "Simplex_tree_interface.h" 31 #include <CGAL/Epick_d.h> 40 namespace witness_complex {
43 class Euclidean_strong_witness_complex_interface {
44 using Dynamic_kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >;
45 using Point_d = Dynamic_kernel::Point_d;
50 Euclidean_strong_witness_complex_interface(
const std::vector<std::vector<double>>& landmarks,
51 const std::vector<std::vector<double>>& witnesses) {
52 landmarks_.reserve(landmarks.size());
53 for (
auto& landmark : landmarks)
54 landmarks_.emplace_back(landmark.begin(), landmark.end());
55 witness_complex_ =
new Euclidean_strong_witness_complex<Dynamic_kernel>(landmarks_, witnesses);
58 ~Euclidean_strong_witness_complex_interface() {
59 delete witness_complex_;
63 std::size_t limit_dimension) {
64 witness_complex_->create_complex(*simplex_tree, max_alpha_square, limit_dimension);
69 witness_complex_->create_complex(*simplex_tree, max_alpha_square);
73 std::vector<double> get_point(
unsigned vh) {
74 std::vector<double> vd;
75 if (vh < landmarks_.size()) {
76 Point_d ph = witness_complex_->get_point(vh);
77 for (
auto coord = ph.cartesian_begin(); coord < ph.cartesian_end(); coord++)
84 std::vector<Point_d> landmarks_;
85 Euclidean_strong_witness_complex<Dynamic_kernel>* witness_complex_;
92 #endif // INCLUDE_EUCLIDEAN_STRONG_WITNESS_COMPLEX_INTERFACE_H_ Simplex Tree data structure for representing simplicial complexes.
Definition: Simplex_tree.h:72
Definition: SimplicialComplexForAlpha.h:26
Key type used as simplex identifier.
Definition: SimplexKey.h:27
void initialize_filtration()
Initializes the filtrations, i.e. sort the simplices according to their order in the filtration and i...
Definition: Simplex_tree.h:796