diff options
Diffstat (limited to 'src/Bottleneck_distance')
3 files changed, 6 insertions, 2 deletions
diff --git a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h index f8fce96c..6fd058a8 100644 --- a/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h +++ b/src/Bottleneck_distance/doc/Intro_bottleneck_distance.h @@ -41,6 +41,9 @@ namespace persistence_diagram { * * \image html perturb_pd.png On this picture, the red edges represent the matching. The bottleneck distance is the length of the longest edge. * + * This implementation is based on ideas from "Geometry Helps in Bottleneck Matching and Related Problems" + * \cite DBLP:journals/algorithmica/EfratIK01. Another relevant publication, although it was not used is + * "Geometry Helps to Compare Persistence Diagrams" \cite Kerber:2017:GHC:3047249.3064175. */ /** @} */ // end defgroup bottleneck_distance diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index 36a63ea0..8c12d353 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -33,6 +33,7 @@ #include <unordered_set> #include <vector> #include <algorithm> // for std::max +#include <cmath> // for std::abs namespace Gudhi { @@ -45,7 +46,7 @@ struct Square_query { typedef Internal_point Point_d; typedef double FT; bool contains(Point_d p) const { - return std::max(std::abs(p.x()-c.x()), std::abs(p.y()-c.y())) <= size; + return (std::max)(std::abs(p.x()-c.x()), std::abs(p.y()-c.y())) <= size; } bool inner_range_intersects(CGAL::Kd_tree_rectangle<FT, D> const&r) const { return diff --git a/src/Bottleneck_distance/utilities/bottleneckdistance.md b/src/Bottleneck_distance/utilities/bottleneckdistance.md index 939eb911..a81426cf 100644 --- a/src/Bottleneck_distance/utilities/bottleneckdistance.md +++ b/src/Bottleneck_distance/utilities/bottleneckdistance.md @@ -22,5 +22,5 @@ This program computes the Bottleneck distance between two persistence diagram fi where
-* `<file_1.pers>` and `<file_2.pers>` must be in the format described [here](/doc/latest/fileformats.html#FileFormatsPers).
+* `<file_1.pers>` and `<file_2.pers>` must be in the format described [here]({{ site.officialurl }}/doc/latest/fileformats.html#FileFormatsPers).
* `<tolerance>` is an error bound on the bottleneck distance (set by default to the smallest positive double value).
|