summaryrefslogtreecommitdiff
path: root/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-05 13:38:57 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-05 13:38:57 +0000
commitb3a64294af818c977804c4b67a317782d872e2b5 (patch)
tree5877d208013369a58c71ae7128ae9292424e7a10 /src/Cech_complex/benchmark/cech_complex_benchmark.cpp
parent3cd1e01f0b0d4fdb46f49ec640c389374ca2fe70 (diff)
Fix doc and tests
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3262 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c76eb981f5960938221aa2498cb87b0707391733
Diffstat (limited to 'src/Cech_complex/benchmark/cech_complex_benchmark.cpp')
-rw-r--r--src/Cech_complex/benchmark/cech_complex_benchmark.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
index 71c88982..83ef9dca 100644
--- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
+++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
@@ -93,12 +93,12 @@ int main(int argc, char * argv[]) {
Radius_distance());
std::cout << radius_clock << std::endl;
- Gudhi::Clock squared_radius_clock("Gudhi::Radius_distance()");
+ Gudhi::Clock common_radius_clock("Gudhi::Radius_distance()");
// Compute the proximity graph of the points
Proximity_graph sq_radius_prox_graph = Gudhi::compute_proximity_graph<Simplex_tree>(off_reader.get_point_cloud(),
threshold,
Gudhi::Radius_distance());
- std::cout << squared_radius_clock << std::endl;
+ std::cout << common_radius_clock << std::endl;
boost::filesystem::path full_path(boost::filesystem::current_path());
@@ -116,6 +116,7 @@ int main(int argc, char * argv[]) {
if ( itr->path().extension() == ".off" ) // see below
{
Points_off_reader off_reader(itr->path().string());
+ Point p0 = off_reader.get_point_cloud()[0];
for (Filtration_value radius = 0.1; radius < 0.4; radius += 0.1) {
std::cout << itr->path().stem() << ";";
@@ -123,7 +124,7 @@ int main(int argc, char * argv[]) {
Gudhi::Clock rips_clock("Rips computation");
Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), radius, Gudhi::Radius_distance());
Simplex_tree rips_stree;
- rips_complex_from_points.create_complex(rips_stree, 2);
+ rips_complex_from_points.create_complex(rips_stree, p0.size() - 1);
// ------------------------------------------
// Display information about the Rips complex
// ------------------------------------------
@@ -133,7 +134,7 @@ int main(int argc, char * argv[]) {
Gudhi::Clock cech_clock("Cech computation");
Cech_complex cech_complex_from_points(off_reader.get_point_cloud(), radius);
Simplex_tree cech_stree;
- cech_complex_from_points.create_complex(cech_stree, 2);
+ cech_complex_from_points.create_complex(cech_stree, p0.size() - 1);
// ------------------------------------------
// Display information about the Cech complex
// ------------------------------------------
@@ -141,6 +142,7 @@ int main(int argc, char * argv[]) {
std::cout << cech_sec << ";";
std::cout << cech_sec / rips_sec << ";";
+ assert(rips_stree.num_simplices() >= cech_stree.num_simplices());
std::cout << rips_stree.num_simplices() << ";";
std::cout << cech_stree.num_simplices() << ";" << std::endl;
}