diff options
Diffstat (limited to 'src/Nerve_GIC/example/GIC.cpp')
-rw-r--r-- | src/Nerve_GIC/example/GIC.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp index 0f50f712..aba0927d 100644 --- a/src/Nerve_GIC/example/GIC.cpp +++ b/src/Nerve_GIC/example/GIC.cpp @@ -32,6 +32,8 @@ void usage(int nbArgs, char * const progName) { int main(int argc, char **argv) { if ((argc != 6) && (argc != 7)) usage(argc, (argv[0] - 1)); + using Point = std::vector<float>; + std::string off_file_name(argv[1]); double threshold = atof(argv[2]); int coord = atoi(argv[3]); @@ -43,8 +45,8 @@ int main(int argc, char **argv) { // Init of a graph induced complex from an OFF file // ---------------------------------------------------------------------------- - Gudhi::graph_induced_complex::Graph_induced_complex GIC; - GIC.set_verbose(verb); + Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC; + GIC.set_verbose(verb); GIC.set_mask(); bool check = GIC.read_point_cloud(off_file_name); @@ -54,7 +56,7 @@ int main(int argc, char **argv) { GIC.set_color_from_coordinate(coord); GIC.set_function_from_coordinate(coord); - GIC.set_graph_from_rips(threshold); + GIC.set_graph_from_rips(threshold, Gudhi::Euclidean_distance()); GIC.set_resolution_double(resolution); GIC.set_gain(gain); GIC.set_cover_from_function(1); @@ -63,7 +65,7 @@ int main(int argc, char **argv) { GIC.plot_txt(); - Simplex_tree stree; GIC.create_complex(stree); + Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); std::streambuf* streambufffer = std::cout.rdbuf(); std::ostream output_stream(streambufffer); |