summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-22 19:13:25 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-22 19:13:25 +0200
commit67366f6ad3770da26f101dc5f6d2e600219e2ace (patch)
tree7a4c0e8ff278a71f76cced1f55874eb333d71e55 /src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp
parent1da601457d00dfe951c89ee97b6f8053e2699c78 (diff)
create_complex is now void method
Diffstat (limited to 'src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp')
-rw-r--r--src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp b/src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp
index a2c85138..dd3c0225 100644
--- a/src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_3d_from_points.cpp
@@ -34,23 +34,22 @@ int main(int argc, char **argv) {
Alpha_complex_3d alpha_complex_from_points(points);
Gudhi::Simplex_tree<> simplex;
- if (alpha_complex_from_points.create_complex(simplex)) {
- // ----------------------------------------------------------------------------
- // Display information about the alpha complex
- // ----------------------------------------------------------------------------
- std::clog << "Alpha complex is of dimension " << simplex.dimension() << " - " << simplex.num_simplices()
- << " simplices - " << simplex.num_vertices() << " vertices." << std::endl;
+ alpha_complex_from_points.create_complex(simplex);
+ // ----------------------------------------------------------------------------
+ // Display information about the alpha complex
+ // ----------------------------------------------------------------------------
+ std::clog << "Alpha complex is of dimension " << simplex.dimension() << " - " << simplex.num_simplices()
+ << " simplices - " << simplex.num_vertices() << " vertices." << std::endl;
- std::clog << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
- for (auto f_simplex : simplex.filtration_simplex_range()) {
- std::clog << " ( ";
- for (auto vertex : simplex.simplex_vertex_range(f_simplex)) {
- std::clog << vertex << " ";
- }
- std::clog << ") -> "
- << "[" << simplex.filtration(f_simplex) << "] ";
- std::clog << std::endl;
+ std::clog << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
+ for (auto f_simplex : simplex.filtration_simplex_range()) {
+ std::clog << " ( ";
+ for (auto vertex : simplex.simplex_vertex_range(f_simplex)) {
+ std::clog << vertex << " ";
}
+ std::clog << ") -> "
+ << "[" << simplex.filtration(f_simplex) << "] ";
+ std::clog << std::endl;
}
return 0;
}