diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-25 15:44:28 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-25 15:44:28 +0000 |
commit | 6965bcc31dfc44ba82524637b4184f8dfdd86e9c (patch) | |
tree | 23c7230d9c63fb7ec5160606a8ccd388579aa15c | |
parent | 6562b8fab76622238928f224ec9b9599603d138b (diff) |
Do not advertise nor use the exact bottleneck distance version
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2711 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e441b042d15bfbe727789803ca17b17711a48d9c
-rw-r--r-- | src/Bottleneck_distance/example/bottleneck_read_file_example.cpp | 12 | ||||
-rw-r--r-- | src/cython/doc/bottleneck_distance_user.rst | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp index 1408681a..24d73c57 100644 --- a/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp +++ b/src/Bottleneck_distance/example/bottleneck_read_file_example.cpp @@ -25,21 +25,21 @@ #include <iostream> #include <vector> #include <utility> // for pair -#include <fstream> -#include <sstream> #include <string> +#include <limits> // for numeric_limits int main(int argc, char** argv) { if (argc < 3) { - std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file " << - "should contain a birth-death pair per line. Third, optional parameter is an error bound on a bottleneck" << - " distance (set by default to zero). The program will now terminate \n"; + std::cout << "To run this program please provide as an input two files with persistence diagrams. Each file" << + " should contain a birth-death pair per line. Third, optional parameter is an error bound on a bottleneck" << + " distance (set by default to the smallest positive double value). If you set the error bound to 0, be" << + " aware this version is exact but expensive. The program will now terminate \n"; return -1; } std::vector<std::pair<double, double>> diag1 = Gudhi::read_persistence_intervals_in_dimension(argv[1]); std::vector<std::pair<double, double>> diag2 = Gudhi::read_persistence_intervals_in_dimension(argv[2]); - double tolerance = 0.; + double tolerance = std::numeric_limits<double>::min(); if (argc == 4) { tolerance = atof(argv[3]); } diff --git a/src/cython/doc/bottleneck_distance_user.rst b/src/cython/doc/bottleneck_distance_user.rst index 0066992f..7692dce2 100644 --- a/src/cython/doc/bottleneck_distance_user.rst +++ b/src/cython/doc/bottleneck_distance_user.rst @@ -25,7 +25,7 @@ This example computes the bottleneck distance from 2 persistence diagrams: message = "Bottleneck distance approximation=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2, 0.1) print(message) - message = "Bottleneck distance exact value=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2, 0) + message = "Bottleneck distance value=" + '%.2f' % gudhi.bottleneck_distance(diag1, diag2) print(message) The output is: @@ -33,4 +33,4 @@ The output is: .. testoutput:: Bottleneck distance approximation=0.81 - Bottleneck distance exact value=0.75 + Bottleneck distance value=0.75 |