summaryrefslogtreecommitdiff
path: root/src/Bottleneck_distance
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bottleneck_distance')
-rw-r--r--src/Bottleneck_distance/include/gudhi/Bottleneck.h4
-rw-r--r--src/Bottleneck_distance/include/gudhi/Neighbors_finder.h1
-rw-r--r--src/Bottleneck_distance/utilities/README10
-rw-r--r--src/Bottleneck_distance/utilities/bottleneckdistance.md18
4 files changed, 21 insertions, 12 deletions
diff --git a/src/Bottleneck_distance/include/gudhi/Bottleneck.h b/src/Bottleneck_distance/include/gudhi/Bottleneck.h
index 8c97dce9..7aee07bb 100644
--- a/src/Bottleneck_distance/include/gudhi/Bottleneck.h
+++ b/src/Bottleneck_distance/include/gudhi/Bottleneck.h
@@ -46,7 +46,7 @@ double bottleneck_distance_approx(Persistence_graph& g, double e) {
if (step <= b_lower_bound || step >= b_upper_bound) // Avoid precision problem
break;
m.set_r(step);
- while (m.multi_augment()) {}; // compute a maximum matching (in the graph corresponding to the current r)
+ while (m.multi_augment()) {} // compute a maximum matching (in the graph corresponding to the current r)
if (m.perfect()) {
m = biggest_unperfect;
b_upper_bound = step;
@@ -68,7 +68,7 @@ double bottleneck_distance_exact(Persistence_graph& g) {
while (lower_bound_i != upper_bound_i) {
long step = lower_bound_i + static_cast<long> ((upper_bound_i - lower_bound_i - 1) / alpha);
m.set_r(sd.at(step));
- while (m.multi_augment()) {}; // compute a maximum matching (in the graph corresponding to the current r)
+ while (m.multi_augment()) {} // compute a maximum matching (in the graph corresponding to the current r)
if (m.perfect()) {
m = biggest_unperfect;
upper_bound_i = step;
diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h
index dc804630..87c7cee5 100644
--- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h
+++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h
@@ -32,6 +32,7 @@
#include <unordered_set>
#include <vector>
+#include <algorithm> // for std::max
namespace Gudhi {
diff --git a/src/Bottleneck_distance/utilities/README b/src/Bottleneck_distance/utilities/README
deleted file mode 100644
index d9fdd252..00000000
--- a/src/Bottleneck_distance/utilities/README
+++ /dev/null
@@ -1,10 +0,0 @@
-# Bottleneck_distance #
-
-## `bottleneck_read_file_example` ##
-This program computes the Bottleneck distance between two persistence diagram files.
-
-Usage:
-`bottleneck_read_file_example <file_1.pers> <file_2.pers> [<tolerance>]`
-where
-`<file_1.pers>` and `<file_2.pers>` must be in the format described [here](http://gudhi.gforge.inria.fr/doc/latest/fileformats.html#FileFormatsPers).
-`<tolerance>` is an error bound on the bottleneck distance (set by default to the smallest positive double value).
diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md
new file mode 100644
index 00000000..526f5822
--- /dev/null
+++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md
@@ -0,0 +1,18 @@
+
+
+# Bottleneck distance #
+
+## bottleneck_read_file_example ##
+
+This program computes the Bottleneck distance between two persistence diagram files.
+
+**Usage**
+
+```
+ bottleneck_read_file_example <file_1.pers> <file_2.pers> [<tolerance>]
+```
+
+where
+
+* `<file_1.pers>` and `<file_2.pers>` must be in the format described [here](/doc/latest/fileformats.html#FileFormatsPers).
+* `<tolerance>` is an error bound on the bottleneck distance (set by default to the smallest positive double value).