23 #ifndef INCLUDE_ALPHA_COMPLEX_INTERFACE_H_ 24 #define INCLUDE_ALPHA_COMPLEX_INTERFACE_H_ 26 #include <gudhi/Simplex_tree.h> 27 #include <gudhi/Alpha_complex.h> 28 #include <CGAL/Epick_d.h> 30 #include "Simplex_tree_interface.h" 38 namespace alpha_complex {
40 class Alpha_complex_interface {
41 using Dynamic_kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >;
42 using Point_d = Dynamic_kernel::Point_d;
45 Alpha_complex_interface(
const std::vector<std::vector<double>>& points) {
46 alpha_complex_ =
new Alpha_complex<Dynamic_kernel>(points);
49 Alpha_complex_interface(
const std::string& off_file_name,
bool from_file =
true) {
50 alpha_complex_ =
new Alpha_complex<Dynamic_kernel>(off_file_name);
53 ~Alpha_complex_interface() {
54 delete alpha_complex_;
57 std::vector<double> get_point(
int vh) {
58 std::vector<double> vd;
60 Point_d ph = alpha_complex_->get_point(vh);
61 for (
auto coord = ph.cartesian_begin(); coord < ph.cartesian_end(); coord++)
63 }
catch (std::out_of_range outofrange) {
69 void create_simplex_tree(Simplex_tree_interface<>* simplex_tree,
double max_alpha_square) {
70 alpha_complex_->create_complex(*simplex_tree, max_alpha_square);
71 simplex_tree->initialize_filtration();
75 Alpha_complex<Dynamic_kernel>* alpha_complex_;
82 #endif // INCLUDE_ALPHA_COMPLEX_INTERFACE_H_ Definition: SimplicialComplexForAlpha.h:26