summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorMathieuCarriere <mathieu.carriere3@gmail.com>2020-03-16 14:19:06 -0400
committerMathieuCarriere <mathieu.carriere3@gmail.com>2020-03-16 14:19:06 -0400
commitaa035c480ba8c1e229f7135257b6a6ae8ad57032 (patch)
tree806269efad3ab4c080344646c104b2699aa20136 /src/Simplex_tree
parent580ca73cac77b4c856fe1f341e496201774a20fd (diff)
parentf40161072b8f74f68b0ff67b6ef2be7abebec950 (diff)
Merge branch 'master' of https://github.com/GUDHI/gudhi-devel into wasserstein_representations
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/example/simple_simplex_tree.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Simplex_tree/example/simple_simplex_tree.cpp b/src/Simplex_tree/example/simple_simplex_tree.cpp
index 4353939f..47ea7e36 100644
--- a/src/Simplex_tree/example/simple_simplex_tree.cpp
+++ b/src/Simplex_tree/example/simple_simplex_tree.cpp
@@ -166,10 +166,19 @@ int main(int argc, char* const argv[]) {
// ++ GENERAL VARIABLE SET
std::cout << "********************************************************************\n";
- // Display the Simplex_tree - Can not be done in the middle of 2 inserts
std::cout << "* The complex contains " << simplexTree.num_simplices() << " simplices\n";
std::cout << " - dimension " << simplexTree.dimension() << "\n";
- std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n";
+ std::cout << "* Iterator on simplices, with [filtration value]:\n";
+ for (Simplex_tree::Simplex_handle f_simplex : simplexTree.complex_simplex_range()) {
+ std::cout << " "
+ << "[" << simplexTree.filtration(f_simplex) << "] ";
+ for (auto vertex : simplexTree.simplex_vertex_range(f_simplex)) std::cout << "(" << vertex << ")";
+ std::cout << std::endl;
+ }
+
+ std::cout << "********************************************************************\n";
+ // Can not be done in the middle of 2 inserts
+ std::cout << "* Iterator on simplices sorted by filtration values, with [filtration value]:\n";
for (auto f_simplex : simplexTree.filtration_simplex_range()) {
std::cout << " "
<< "[" << simplexTree.filtration(f_simplex) << "] ";