summaryrefslogtreecommitdiff
path: root/src/Nerve_GIC/example
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-13 16:14:33 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-13 16:14:33 +0000
commit47b98207fa51f6a05094334ebf4471968a1bc526 (patch)
treece7b39e14c6aed87854a192b53c75738859c787f /src/Nerve_GIC/example
parent39aa69c8b968f9f86a71106d64785b0f31c20914 (diff)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2415 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 24964dc19f3bf6646ac5c8218b12714f4821cadc
Diffstat (limited to 'src/Nerve_GIC/example')
-rw-r--r--src/Nerve_GIC/example/CMakeLists.txt3
-rw-r--r--src/Nerve_GIC/example/GIC.cpp10
-rw-r--r--src/Nerve_GIC/example/GIC.txt125
-rw-r--r--src/Nerve_GIC/example/GICvoronoi.cpp8
-rw-r--r--src/Nerve_GIC/example/MapperDeltaCoord.cpp10
-rw-r--r--src/Nerve_GIC/example/MapperDeltaCoord.txt173
-rw-r--r--src/Nerve_GIC/example/MapperDeltaFunc.cpp6
-rw-r--r--src/Nerve_GIC/example/MapperDeltaFunc.txt7
-rw-r--r--src/Nerve_GIC/example/Nerve.cpp8
-rw-r--r--src/Nerve_GIC/example/Nerve.txt49
10 files changed, 226 insertions, 173 deletions
diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt
index a4cb0f03..a2e4efe5 100644
--- a/src/Nerve_GIC/example/CMakeLists.txt
+++ b/src/Nerve_GIC/example/CMakeLists.txt
@@ -13,9 +13,6 @@ target_link_libraries(MapperDeltaCoord ${Boost_SYSTEM_LIBRARY})
add_executable ( MapperDeltaFunc MapperDeltaFunc.cpp )
target_link_libraries(MapperDeltaFunc ${Boost_SYSTEM_LIBRARY})
-add_executable ( GICvoronoi GICvoronoi.cpp )
-target_link_libraries(GICvoronoi ${Boost_SYSTEM_LIBRARY})
-
file(COPY visu.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
if (TBB_FOUND)
diff --git a/src/Nerve_GIC/example/GIC.cpp b/src/Nerve_GIC/example/GIC.cpp
index 1ab15ecc..cae0d55d 100644
--- a/src/Nerve_GIC/example/GIC.cpp
+++ b/src/Nerve_GIC/example/GIC.cpp
@@ -3,7 +3,7 @@
void usage(int nbArgs, char * const progName) {
std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
std::cerr << "Usage: " << progName << " filename.off threshold coordinate resolution gain\n";
- std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 0.075 2 10 0.3 \n";
+ std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 0.075 2 0.075 0 \n";
exit(-1); // ----- >>
}
@@ -24,10 +24,12 @@ int main(int argc, char **argv) {
Gudhi::graph_induced_complex::Graph_induced_complex GIC;
GIC.set_verbose(verb);
- GIC.set_color_from_coordinate(off_file_name, coord);
- GIC.set_function_from_coordinate(coord, off_file_name);
+ GIC.read_point_cloud(off_file_name);
- GIC.set_graph_from_rips(threshold, off_file_name);
+ GIC.set_color_from_coordinate(coord);
+ GIC.set_function_from_coordinate(coord);
+
+ GIC.set_graph_from_rips(threshold);
GIC.set_resolution_double(resolution); GIC.set_gain(gain);
GIC.set_cover_from_function(1);
diff --git a/src/Nerve_GIC/example/GIC.txt b/src/Nerve_GIC/example/GIC.txt
index 9871cf41..6d9f07f5 100644
--- a/src/Nerve_GIC/example/GIC.txt
+++ b/src/Nerve_GIC/example/GIC.txt
@@ -1,57 +1,92 @@
-Cloud
-Function
-0 0
-27 26
-0 -0.949318 240
-1 -0.949346 240
-2 -0.822129 50
-3 -0.822037 51
-4 -0.723847 48
-5 -0.722679 48
-6 -0.625409 57
-7 -0.625771 57
-8 -0.528161 99
-9 -0.528188 99
-10 -0.436343 126
-11 -0.436356 126
-12 -0.330775 194
-13 -0.233638 98
-14 -0.116276 100
-15 -0.129017 144
-16 -0.116513 103
-17 -0.0213554 243
-18 -0.0301512 65
-19 -0.0315443 66
-20 0.0750623 308
-21 0.166778 305
-22 0.270037 307
-23 0.371609 380
-24 0.468078 306
-25 0.567395 312
-26 0.721079 534
+../../../../data/points/human.off
+coordinate 2
+coordinate 2
+0.075 0
+44 43
+0 -0.954369 220
+1 -0.954377 220
+2 -0.869559 45
+3 -0.869405 45
+4 -0.794255 25
+5 -0.795222 26
+6 -0.723847 48
+7 -0.722679 48
+8 -0.633796 48
+9 -0.634232 48
+10 -0.564455 48
+11 -0.564428 48
+12 -0.491837 98
+13 -0.491864 98
+14 -0.422733 88
+15 -0.422739 88
+16 -0.343376 74
+17 -0.343367 74
+18 -0.271635 96
+19 -0.190912 96
+20 -0.158869 3
+21 -0.158905 3
+22 -0.114958 97
+23 -0.108561 96
+24 -0.115241 100
+25 -0.0317845 185
+26 -0.041866 50
+27 -0.0429161 51
+28 0.0353033 158
+29 0.0275106 31
+30 0.0252492 30
+31 0.107097 170
+32 0.110226 51
+33 0.110952 50
+34 0.186188 57
+35 0.176564 97
+36 0.186215 57
+37 0.256898 232
+38 0.338811 268
+39 0.406299 273
+40 0.481925 220
+41 0.555454 241
+42 0.632415 198
+43 0.744473 407
0 3
1 2
-2 5
-3 4
+2 4
+3 5
4 7
5 6
6 9
7 8
8 10
9 11
-10 12
+10 13
11 12
-12 13
+12 14
13 15
-14 19
+14 16
15 17
16 18
-17 20
-18 20
-19 20
-20 21
-21 22
-22 23
-23 24
-24 25
-25 26
+17 18
+18 19
+19 23
+20 22
+21 24
+22 27
+23 25
+24 26
+25 28
+26 29
+27 30
+28 31
+29 33
+30 32
+31 35
+32 34
+33 36
+34 37
+35 37
+36 37
+37 38
+38 39
+39 40
+40 41
+41 42
+42 43
diff --git a/src/Nerve_GIC/example/GICvoronoi.cpp b/src/Nerve_GIC/example/GICvoronoi.cpp
index 2d50ab4d..141268a5 100644
--- a/src/Nerve_GIC/example/GICvoronoi.cpp
+++ b/src/Nerve_GIC/example/GICvoronoi.cpp
@@ -22,15 +22,17 @@ int main(int argc, char **argv) {
Gudhi::graph_induced_complex::Graph_induced_complex GIC;
GIC.set_verbose(verb);
- GIC.set_color_from_coordinate(off_file_name);
+ GIC.read_point_cloud(off_file_name);
+
+ GIC.set_color_from_coordinate();
GIC.set_graph_from_OFF(off_file_name);
- GIC.set_cover_from_Voronoi(m, off_file_name);
+ GIC.set_cover_from_Voronoi(m);
GIC.find_GIC_simplices();
- GIC.plot_with_KeplerMapper();
+ GIC.plot_with_Geomview();
Simplex_tree stree; GIC.create_complex(stree);
diff --git a/src/Nerve_GIC/example/MapperDeltaCoord.cpp b/src/Nerve_GIC/example/MapperDeltaCoord.cpp
index 950ee58a..c4d86caf 100644
--- a/src/Nerve_GIC/example/MapperDeltaCoord.cpp
+++ b/src/Nerve_GIC/example/MapperDeltaCoord.cpp
@@ -3,7 +3,7 @@
void usage(int nbArgs, char * const progName) {
std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
std::cerr << "Usage: " << progName << " filename.off coordinate \n";
- std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 2 --v \n";
+ std::cerr << " i.e.: " << progName << " ../../../../data/points/human.off 2 --v \n";
exit(-1); // ----- >>
}
@@ -21,10 +21,12 @@ int main(int argc, char **argv) {
Gudhi::graph_induced_complex::Graph_induced_complex GIC;
GIC.set_verbose(verb);
- GIC.set_color_from_coordinate(off_file_name, coord);
- GIC.set_function_from_coordinate(coord, off_file_name);
+ GIC.read_point_cloud(off_file_name);
- GIC.set_graph_from_automatic_rips(off_file_name);
+ GIC.set_color_from_coordinate(coord);
+ GIC.set_function_from_coordinate(coord);
+
+ GIC.set_graph_from_automatic_rips();
GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain();
GIC.set_cover_from_function(1);
diff --git a/src/Nerve_GIC/example/MapperDeltaCoord.txt b/src/Nerve_GIC/example/MapperDeltaCoord.txt
index 2c2296ea..c1ead814 100644
--- a/src/Nerve_GIC/example/MapperDeltaCoord.txt
+++ b/src/Nerve_GIC/example/MapperDeltaCoord.txt
@@ -1,68 +1,73 @@
-Cloud
-Function
-0 0
-61 60
-0 -0.954369 220
-1 -0.954377 220
-2 -0.902361 54
-3 -0.901235 55
+../../../../data/points/human.off
+coordinate 2
+coordinate 2
+0.072934 0.3
+65 64
+0 -0.954816 218
+1 -0.954824 218
+2 -0.903705 57
+3 -0.9035 57
4 -0.84796 27
-5 -0.844637 29
-6 -0.777883 37
-7 -0.778882 39
-8 -0.72868 42
-9 -0.72734 42
-10 -0.677728 48
-11 -0.676848 48
+5 -0.847937 27
+6 -0.794255 25
+7 -0.791001 29
+8 -0.73369 36
+9 -0.733071 35
+10 -0.683795 40
+11 -0.682735 40
12 -0.633796 48
13 -0.634232 48
-14 -0.567924 52
-15 -0.567897 52
-16 -0.52287 77
-17 -0.522897 77
-18 -0.467859 105
-19 -0.467886 105
-20 -0.422377 87
-21 -0.422383 87
-22 -0.363537 80
-23 -0.363508 80
-24 -0.312836 126
-25 -0.267775 84
-26 -0.197152 78
-27 -0.149293 96
-28 -0.134636 48
-29 -0.134463 51
-30 -0.104389 93
-31 -0.108561 96
-32 -0.105219 93
-33 -0.0362235 183
-34 -0.0498358 53
-35 -0.050197 51
-36 -0.000444973 187
-37 0.000472738 42
-38 -0.000214643 42
-39 0.0616246 164
-40 0.0590725 29
-41 0.0590271 31
-42 0.108834 170
-43 0.110991 50
-44 0.110952 50
-45 0.158372 129
-46 0.161945 54
-47 0.161972 54
-48 0.210958 76
-49 0.221521 73
-50 0.221548 73
-51 0.263419 220
-52 0.324345 241
-53 0.371963 311
-54 0.422902 272
-55 0.476693 223
-56 0.530461 246
-57 0.58285 217
-58 0.63636 203
-59 0.690953 230
-60 0.76296 309
+14 -0.585137 64
+15 -0.585197 64
+16 -0.527997 66
+17 -0.528025 66
+18 -0.478646 93
+19 -0.478673 93
+20 -0.43674 99
+21 -0.436761 99
+22 -0.380976 70
+23 -0.380955 70
+24 -0.33528 72
+25 -0.335279 72
+26 -0.277496 112
+27 -0.232679 96
+28 -0.1842 77
+29 -0.149795 16
+30 -0.150304 16
+31 -0.119698 90
+32 -0.122291 74
+33 -0.119626 94
+34 -0.0849586 74
+35 -0.0681724 107
+36 -0.0856915 73
+37 -0.0263688 211
+38 -0.025358 49
+39 -0.025088 50
+40 0.0287585 146
+41 0.022349 34
+42 0.0213867 34
+43 0.0768417 175
+44 0.081987 34
+45 0.0819086 34
+46 0.128047 150
+47 0.129348 53
+48 0.128561 54
+49 0.173705 104
+50 0.180884 53
+51 0.180911 53
+52 0.229553 68
+53 0.233083 77
+54 0.23311 77
+55 0.283572 215
+56 0.338574 266
+57 0.381249 299
+58 0.433627 244
+59 0.485309 214
+60 0.535849 237
+61 0.588559 193
+62 0.638771 196
+63 0.692993 222
+64 0.763344 307
0 3
1 2
2 4
@@ -86,40 +91,44 @@ Function
20 22
21 23
22 24
-23 24
-24 25
+23 25
+24 26
25 26
26 27
-27 31
-28 30
-29 32
-30 35
-31 33
-32 34
+27 28
+28 32
+29 31
+30 33
+31 34
+32 35
33 36
-34 37
-35 38
-36 39
-37 41
-38 40
+34 39
+35 37
+36 38
+37 40
+38 41
39 42
40 43
-41 44
-42 45
+41 45
+42 44
43 46
44 47
45 48
46 49
47 50
48 51
-49 51
-50 51
-51 52
-52 53
-53 54
+49 52
+50 53
+51 54
+52 55
+53 55
54 55
55 56
56 57
57 58
58 59
59 60
+60 61
+61 62
+62 63
+63 64
diff --git a/src/Nerve_GIC/example/MapperDeltaFunc.cpp b/src/Nerve_GIC/example/MapperDeltaFunc.cpp
index 658b0273..1c3a77a5 100644
--- a/src/Nerve_GIC/example/MapperDeltaFunc.cpp
+++ b/src/Nerve_GIC/example/MapperDeltaFunc.cpp
@@ -3,7 +3,7 @@
void usage(int nbArgs, char * const progName) {
std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
std::cerr << "Usage: " << progName << " filename.off coordinate \n";
- std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 2 --v \n";
+ std::cerr << " i.e.: " << progName << " ../../../../data/points/COIL_database/lucky_cat.off ../../../../data/points/COIL_database/lucky_cat_PCA1 --v \n";
exit(-1); // ----- >>
}
@@ -21,10 +21,12 @@ int main(int argc, char **argv) {
Gudhi::graph_induced_complex::Graph_induced_complex GIC;
GIC.set_verbose(verb);
+ GIC.read_point_cloud(off_file_name);
+
GIC.set_color_from_file(func_file_name);
GIC.set_function_from_file(func_file_name);
- GIC.set_graph_from_automatic_rips(off_file_name);
+ GIC.set_graph_from_automatic_rips();
GIC.set_automatic_resolution_for_GICMAP(); GIC.set_gain();
GIC.set_cover_from_function(1);
diff --git a/src/Nerve_GIC/example/MapperDeltaFunc.txt b/src/Nerve_GIC/example/MapperDeltaFunc.txt
index 046d2278..01b0fbea 100644
--- a/src/Nerve_GIC/example/MapperDeltaFunc.txt
+++ b/src/Nerve_GIC/example/MapperDeltaFunc.txt
@@ -1,6 +1,7 @@
-Cloud
-Function
-0 0
+../../../../data/points/COIL_database/lucky_cat.off
+../../../../data/points/COIL_database/lucky_cat_PCA1
+../../../../data/points/COIL_database/lucky_cat_PCA1
+2592.99 0.3
6 6
0 -1382.24 20
1 385.162 3
diff --git a/src/Nerve_GIC/example/Nerve.cpp b/src/Nerve_GIC/example/Nerve.cpp
index a0de31ae..a549f544 100644
--- a/src/Nerve_GIC/example/Nerve.cpp
+++ b/src/Nerve_GIC/example/Nerve.cpp
@@ -3,7 +3,7 @@
void usage(int nbArgs, char * const progName) {
std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
std::cerr << "Usage: " << progName << " filename.off coordinate resolution gain --v \n";
- std::cerr << " i.e.: " << progName << " ../../../data/points/human.off 2 10 0.3 --v \n";
+ std::cerr << " i.e.: " << progName << " ../../../../data/human.off 2 10 0.3 --v \n";
exit(-1); // ----- >>
}
@@ -23,8 +23,10 @@ int main(int argc, char **argv) {
Gudhi::graph_induced_complex::Graph_induced_complex GIC;
GIC.set_verbose(verb);
- GIC.set_color_from_coordinate(off_file_name, coord);
- GIC.set_function_from_coordinate(coord, off_file_name);
+ GIC.read_point_cloud(off_file_name);
+
+ GIC.set_color_from_coordinate(coord);
+ GIC.set_function_from_coordinate(coord);
GIC.set_graph_from_OFF(off_file_name);
diff --git a/src/Nerve_GIC/example/Nerve.txt b/src/Nerve_GIC/example/Nerve.txt
index 9ebb2fbb..a6fad665 100644
--- a/src/Nerve_GIC/example/Nerve.txt
+++ b/src/Nerve_GIC/example/Nerve.txt
@@ -1,28 +1,29 @@
-Cloud
-Function
-0 0
+../../../../data/points/human.off
+coordinate 2
+coordinate 2
+0 0.3
21 20
-0 -0.0149926 290
-1 -0.0152551 291
-2 -0.0695028 127
-3 -0.0700955 128
-4 -0.0449554 250
-5 -0.045006 251
-6 -0.0130144 247
-7 -0.0131973 247
-8 0.0766414 127
-9 -0.0118972 165
-10 -0.0121551 165
-11 0.0785204 128
-12 0.0559145 183
-13 -0.0298394 542
-14 0.0569878 181
-15 -0.0201742 388
-16 -0.00110905 208
-17 -0.00131087 208
-18 0.0228028 854
-19 0.0181739 764
-20 0.0307483 597
+0 -0.927412 290
+1 -0.927011 291
+2 -0.708477 127
+3 -0.709946 128
+4 -0.513775 250
+5 -0.514319 251
+6 -0.376304 247
+7 -0.376315 247
+8 -0.104886 127
+9 -0.168391 165
+10 -0.16871 165
+11 -0.105984 128
+12 -0.0174106 183
+13 0.0197303 542
+14 -0.0161482 181
+15 0.159925 388
+16 0.204922 208
+17 0.204892 208
+18 0.368798 854
+19 0.542323 764
+20 0.709288 597
0 2
1 3
2 5