summaryrefslogtreecommitdiff
path: root/src/Nerve_GIC/example
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-10-21 00:15:29 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-10-21 00:15:29 +0000
commit4714ef44a23b156c16b04550c7b519cf456cb4c2 (patch)
treef7aaea465ad65803f8f55a4ffbd744d31be6a8fb /src/Nerve_GIC/example
parentec228f211bd29661951c397fea55f934ab6369ac (diff)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2799 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e41f8d57ca5e3e6ab90020f716d6362c73ee48da
Diffstat (limited to 'src/Nerve_GIC/example')
-rw-r--r--src/Nerve_GIC/example/CoordGIC.cpp6
-rw-r--r--src/Nerve_GIC/example/FuncGIC.cpp6
-rw-r--r--src/Nerve_GIC/example/Nerve.cpp25
-rw-r--r--src/Nerve_GIC/example/VoronoiGIC.cpp5
4 files changed, 24 insertions, 18 deletions
diff --git a/src/Nerve_GIC/example/CoordGIC.cpp b/src/Nerve_GIC/example/CoordGIC.cpp
index 89b0f9a4..68ca6c98 100644
--- a/src/Nerve_GIC/example/CoordGIC.cpp
+++ b/src/Nerve_GIC/example/CoordGIC.cpp
@@ -50,15 +50,17 @@ int main(int argc, char **argv) {
if(!check) std::cout << "Incorrect OFF file." << std::endl;
else{
+ GIC.set_type("GIC");
+
GIC.set_color_from_coordinate(coord);
GIC.set_function_from_coordinate(coord);
GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance());
- GIC.set_automatic_resolution_for_GIC(); GIC.set_gain();
+ GIC.set_automatic_resolution(); GIC.set_gain();
GIC.set_cover_from_function();
- GIC.find_GIC_simplices_with_functional_minimal_cover();
+ GIC.find_simplices();
GIC.plot_DOT();
diff --git a/src/Nerve_GIC/example/FuncGIC.cpp b/src/Nerve_GIC/example/FuncGIC.cpp
index 56c97b7f..71448ea4 100644
--- a/src/Nerve_GIC/example/FuncGIC.cpp
+++ b/src/Nerve_GIC/example/FuncGIC.cpp
@@ -50,15 +50,17 @@ int main(int argc, char **argv) {
if(!check) std::cout << "Incorrect OFF file." << std::endl;
else{
+ GIC.set_type("GIC");
+
GIC.set_color_from_file(func_file_name);
GIC.set_function_from_file(func_file_name);
GIC.set_graph_from_automatic_rips(Gudhi::Euclidean_distance());
- GIC.set_automatic_resolution_for_GIC(); GIC.set_gain();
+ GIC.set_automatic_resolution(); GIC.set_gain();
GIC.set_cover_from_function();
- GIC.find_GIC_simplices_with_functional_minimal_cover();
+ GIC.find_simplices();
GIC.plot_DOT();
diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp
index e863b48b..cecc45c5 100644
--- a/src/Nerve_GIC/example/Nerve.cpp
+++ b/src/Nerve_GIC/example/Nerve.cpp
@@ -39,33 +39,34 @@ int main(int argc, char **argv) {
int resolution = atoi(argv[3]);
double gain = atof(argv[4]);
bool verb = 0; if(argc == 6) verb = 1;
- //int mask = 0;
// --------------------------------
// Init of a Nerve from an OFF file
// --------------------------------
- Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC;
- GIC.set_verbose(verb);
+ Gudhi::graph_induced_complex::Graph_induced_complex<Point> SC;
+ SC.set_verbose(verb);
- bool check = GIC.read_point_cloud(off_file_name);
+ bool check = SC.read_point_cloud(off_file_name);
if(!check) std::cout << "Incorrect OFF file." << std::endl;
else{
- GIC.set_color_from_coordinate(coord);
- GIC.set_function_from_coordinate(coord);
+ SC.set_type("Nerve");
- GIC.set_graph_from_OFF();
+ SC.set_color_from_coordinate(coord);
+ SC.set_function_from_coordinate(coord);
- GIC.set_resolution_with_interval_number(resolution); GIC.set_gain(gain);
- GIC.set_cover_from_function();
+ SC.set_graph_from_OFF();
- GIC.find_Nerve_simplices();
+ SC.set_resolution_with_interval_number(resolution); SC.set_gain(gain);
+ SC.set_cover_from_function();
- GIC.plot_TXT();
+ SC.find_simplices();
- Gudhi::Simplex_tree<> stree; GIC.create_complex(stree);
+ SC.write_info();
+
+ Gudhi::Simplex_tree<> stree; SC.create_complex(stree);
// ----------------------------------------------------------------------------
// Display information about the graph induced complex
diff --git a/src/Nerve_GIC/example/VoronoiGIC.cpp b/src/Nerve_GIC/example/VoronoiGIC.cpp
index f000c263..20fe2480 100644
--- a/src/Nerve_GIC/example/VoronoiGIC.cpp
+++ b/src/Nerve_GIC/example/VoronoiGIC.cpp
@@ -37,7 +37,6 @@ int main(int argc, char **argv) {
std::string off_file_name(argv[1]);
int m = atoi(argv[2]);
bool verb = 0; if(argc == 4) verb = 1;
- //int mask = 0;
// ----------------------------------------------------------------------------
// Init of a graph induced complex from an OFF file
@@ -51,13 +50,15 @@ int main(int argc, char **argv) {
if(!check) std::cout << "Incorrect OFF file." << std::endl;
else{
+ GIC.set_type("GIC");
+
GIC.set_color_from_coordinate();
GIC.set_graph_from_OFF();
GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(),m);
- GIC.find_GIC_simplices();
+ GIC.find_simplices();
GIC.plot_OFF();