diff options
Diffstat (limited to 'src/Alpha_complex/example')
-rw-r--r-- | src/Alpha_complex/example/Alpha_complex_from_off.cpp | 9 | ||||
-rw-r--r-- | src/Alpha_complex/example/Alpha_complex_from_points.cpp | 18 |
2 files changed, 7 insertions, 20 deletions
diff --git a/src/Alpha_complex/example/Alpha_complex_from_off.cpp b/src/Alpha_complex/example/Alpha_complex_from_off.cpp index 4f381892..780f904b 100644 --- a/src/Alpha_complex/example/Alpha_complex_from_off.cpp +++ b/src/Alpha_complex/example/Alpha_complex_from_off.cpp @@ -1,12 +1,13 @@ +#include <gudhi/Alpha_complex.h> +#include <CGAL/Epick_d.h> + #include <iostream> #include <string> -#include <gudhi/Alpha_complex.h> - void usage(char * const progName) { std::cerr << "Usage: " << progName << " filename.off alpha_square_max_value" << std::endl; std::cerr << " i.e.: " << progName << " ../../data/points/alphacomplexdoc.off 60.0" << std::endl; - exit(-1); // ----- >> + exit(-1); // ----- >> } int main(int argc, char **argv) { @@ -23,7 +24,7 @@ int main(int argc, char **argv) { // ---------------------------------------------------------------------------- typedef CGAL::Epick_d< CGAL::Dynamic_dimension_tag > Kernel; Gudhi::alphacomplex::Alpha_complex<Kernel> alpha_complex_from_file(off_file_name, alpha_square_max_value); - + // ---------------------------------------------------------------------------- // Display information about the alpha complex // ---------------------------------------------------------------------------- diff --git a/src/Alpha_complex/example/Alpha_complex_from_points.cpp b/src/Alpha_complex/example/Alpha_complex_from_points.cpp index 00e988a6..dab161c9 100644 --- a/src/Alpha_complex/example/Alpha_complex_from_points.cpp +++ b/src/Alpha_complex/example/Alpha_complex_from_points.cpp @@ -1,31 +1,17 @@ -#include <stdlib.h> -#include <CGAL/Delaunay_triangulation.h> #include <CGAL/Epick_d.h> +#include <gudhi/Alpha_complex.h> #include <iostream> #include <string> #include <vector> -#include <gudhi/Alpha_complex.h> - typedef CGAL::Epick_d< CGAL::Dimension_tag<2> > Kernel; typedef Kernel::Point_d Point; typedef std::vector<Point> Vector_of_points; -void usage(char * const progName) { - std::cerr << "Usage: " << progName << " alpha_square_max_value" << std::endl; - std::cerr << " i.e.: " << progName << " 32.0" << std::endl; - exit(-1); // ----- >> -} - int main(int argc, char **argv) { - if (argc != 2) { - std::cerr << "Error: Number of arguments (" << argc << ") is not correct" << std::endl; - usage(argv[0]); - } + double alpha_square_max_value = 32.0; - double alpha_square_max_value = atof(argv[1]); - // ---------------------------------------------------------------------------- // Init of a list of points // ---------------------------------------------------------------------------- |