From 258439dfbe0d109b1ab26e9b60370cafdc78ac3e Mon Sep 17 00:00:00 2001 From: glisse Date: Tue, 30 Jan 2018 16:31:13 +0000 Subject: Double all filtration values. It was using the Cech convention, not the Rips, so the Rips approximation was not close to the Rips, which is likely to confuse users. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/sparserips-glisse@3188 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7b948c956f39dc75931cb00a64516d08ff42e435 --- src/Rips_complex/include/gudhi/Sparse_rips_complex.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Rips_complex/include/gudhi/Sparse_rips_complex.h') diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index e1e3a951..b8850d00 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -152,10 +152,11 @@ class Sparse_rips_complex { GUDHI_CHECK(lj <= li, "Bad furthest point sorting"); Filtration_value alpha; + // The paper has d/2 and d-lj/e to match the Cech, but we use doubles to match the Rips if(d * epsilon <= 2 * lj) - alpha = d / 2; + alpha = d; else if(d * epsilon <= li + lj && (epsilon >= 1 || d * epsilon <= lj * (1 + 1 / (1 - epsilon)))) - alpha = d - lj / epsilon; + alpha = (d - lj / epsilon) * 2; else continue; add_edge(pi, pj, alpha, graph_); -- cgit v1.2.3