diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-02-01 18:19:00 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-02-01 18:19:00 +0000 |
commit | 24386d494ba4b8bb19b4559f6d2b3e4ecc980571 (patch) | |
tree | f4c1034bd75d6f8a237a4ff7c5f30df6d6732803 /src/Bottleneck_distance | |
parent | d3ff96460cbcd7de4d1f2d03c61e4227dd4c4767 (diff) | |
parent | e15408b4af5cba8966aa8773f6ee6884942c1d95 (diff) |
Merge from trunk.
hand-merge README that moved to *.md.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/sparserips-glisse@3201 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: f1922a265c79937e507bbb963875d21fae88069e
Diffstat (limited to 'src/Bottleneck_distance')
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).
|