diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-24 11:48:20 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-24 11:48:20 +0000 |
commit | 12814e8ef128d4d19d633ce2b6931d4599ce15ba (patch) | |
tree | 0e852a9e50fad5412eb043fe48b5e4ed13e7d63a /src/Alpha_complex/example | |
parent | 2ca2d175f0b49ff267d9a99e5a4c0a5f03e0d30c (diff) | |
parent | 56f297d7338abf37ed788cace18e883d3dde1e7f (diff) |
Merge trunk + alpha complex fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@753 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: a0a1f71420736a0a702e6dbc76bc010b36bf5e13
Diffstat (limited to 'src/Alpha_complex/example')
-rw-r--r-- | src/Alpha_complex/example/Alpha_complex_from_off.cpp | 14 | ||||
-rw-r--r-- | src/Alpha_complex/example/alphaoffreader_for_doc.txt | 38 |
2 files changed, 27 insertions, 25 deletions
diff --git a/src/Alpha_complex/example/Alpha_complex_from_off.cpp b/src/Alpha_complex/example/Alpha_complex_from_off.cpp index 3ce4c7f4..b698d6d7 100644 --- a/src/Alpha_complex/example/Alpha_complex_from_off.cpp +++ b/src/Alpha_complex/example/Alpha_complex_from_off.cpp @@ -10,7 +10,7 @@ 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) { @@ -37,12 +37,14 @@ int main(int argc, char **argv) { std::cout << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl; for (auto f_simplex : alpha_complex_from_file.filtration_simplex_range()) { - std::cout << " ( "; - for (auto vertex : alpha_complex_from_file.simplex_vertex_range(f_simplex)) { - std::cout << vertex << " "; + if (alpha_complex_from_file.filtration(f_simplex) <= alpha_complex_from_file.filtration()) { + std::cout << " ( "; + for (auto vertex : alpha_complex_from_file.simplex_vertex_range(f_simplex)) { + std::cout << vertex << " "; + } + std::cout << ") -> " << "[" << alpha_complex_from_file.filtration(f_simplex) << "] "; + std::cout << std::endl; } - std::cout << ") -> " << "[" << alpha_complex_from_file.filtration(f_simplex) << "] "; - std::cout << std::endl; } return 0; } diff --git a/src/Alpha_complex/example/alphaoffreader_for_doc.txt b/src/Alpha_complex/example/alphaoffreader_for_doc.txt index 1153f097..71f29a00 100644 --- a/src/Alpha_complex/example/alphaoffreader_for_doc.txt +++ b/src/Alpha_complex/example/alphaoffreader_for_doc.txt @@ -1,27 +1,27 @@ Alpha complex is of dimension 2 - 25 simplices - 7 vertices. Iterator on alpha complex simplices in the filtration order, with [filtration value]: + ( 0 ) -> [0] ( 1 ) -> [0] ( 2 ) -> [0] ( 3 ) -> [0] ( 4 ) -> [0] ( 5 ) -> [0] ( 6 ) -> [0] - ( 7 ) -> [0] - ( 4 3 ) -> [6.25] - ( 6 5 ) -> [7.25] - ( 3 1 ) -> [8.5] - ( 2 1 ) -> [9.25] - ( 4 2 ) -> [10] - ( 3 2 ) -> [11.25] - ( 4 3 2 ) -> [12.5] - ( 3 2 1 ) -> [12.9959] - ( 7 6 ) -> [13.25] - ( 5 3 ) -> [20] - ( 7 5 ) -> [22.7367] - ( 7 6 5 ) -> [22.7367] - ( 7 4 ) -> [30.25] - ( 7 3 ) -> [36.5] - ( 7 4 3 ) -> [36.5] - ( 7 5 3 ) -> [37.2449] - ( 5 1 ) -> [59.7107] - ( 5 3 1 ) -> [59.7107] + ( 3 2 ) -> [6.25] + ( 5 4 ) -> [7.25] + ( 2 0 ) -> [8.5] + ( 1 0 ) -> [9.25] + ( 3 1 ) -> [10] + ( 2 1 ) -> [11.25] + ( 3 2 1 ) -> [12.5] + ( 2 1 0 ) -> [12.9959] + ( 6 5 ) -> [13.25] + ( 4 2 ) -> [20] + ( 6 4 ) -> [22.7367] + ( 6 5 4 ) -> [22.7367] + ( 6 3 ) -> [30.25] + ( 6 2 ) -> [36.5] + ( 6 3 2 ) -> [36.5] + ( 6 4 2 ) -> [37.2449] + ( 4 0 ) -> [59.7107] + ( 4 2 0 ) -> [59.7107] |