From 4aff8dc700a0790373d82ae24076359c09ee04c8 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Mon, 1 Jun 2020 15:24:28 +0200 Subject: Interface for hera's bottleneck_distance --- src/python/doc/bottleneck_distance_user.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/python/doc/bottleneck_distance_user.rst') diff --git a/src/python/doc/bottleneck_distance_user.rst b/src/python/doc/bottleneck_distance_user.rst index 89da89d3..49bd3706 100644 --- a/src/python/doc/bottleneck_distance_user.rst +++ b/src/python/doc/bottleneck_distance_user.rst @@ -9,14 +9,22 @@ Definition .. include:: bottleneck_distance_sum.inc -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`. +This implementation by François Godi is based on ideas from "Geometry Helps in Bottleneck Matching and Related Problems" +:cite:`DBLP:journals/algorithmica/EfratIK01` and requires `CGAL `_. -Function --------- .. autofunction:: gudhi.bottleneck_distance +This other implementation comes from `Hera +`_ (BSD-3-Clause) which is +based on "Geometry Helps to Compare Persistence Diagrams" +:cite:`Kerber:2017:GHC:3047249.3064175` by Michael Kerber, Dmitriy +Morozov, and Arnur Nigmetov. + +Beware that its approximation allows for a multiplicative error, while the function above uses an additive error. + +.. autofunction:: gudhi.hera.bottleneck_distance + + Distance computation -------------------- -- cgit v1.2.3 From 82dc35dd749a1f388be268d7a7e3bd22f18afcf7 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 5 Jun 2020 20:16:38 +0200 Subject: Doc changes after Vincent's review --- src/python/doc/bottleneck_distance_user.rst | 5 +++-- src/python/gudhi/bottleneck.cc | 3 ++- src/python/gudhi/hera/bottleneck.cc | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/python/doc/bottleneck_distance_user.rst') diff --git a/src/python/doc/bottleneck_distance_user.rst b/src/python/doc/bottleneck_distance_user.rst index 49bd3706..6c6e08d9 100644 --- a/src/python/doc/bottleneck_distance_user.rst +++ b/src/python/doc/bottleneck_distance_user.rst @@ -10,7 +10,7 @@ Definition .. include:: bottleneck_distance_sum.inc This implementation by François Godi is based on ideas from "Geometry Helps in Bottleneck Matching and Related Problems" -:cite:`DBLP:journals/algorithmica/EfratIK01` and requires `CGAL `_. +:cite:`DBLP:journals/algorithmica/EfratIK01` and requires `CGAL `_ (`GPL v3 `_). .. autofunction:: gudhi.bottleneck_distance @@ -20,7 +20,8 @@ based on "Geometry Helps to Compare Persistence Diagrams" :cite:`Kerber:2017:GHC:3047249.3064175` by Michael Kerber, Dmitriy Morozov, and Arnur Nigmetov. -Beware that its approximation allows for a multiplicative error, while the function above uses an additive error. +.. warning:: + Beware that its approximation allows for a multiplicative error, while the function above uses an additive error. .. autofunction:: gudhi.hera.bottleneck_distance diff --git a/src/python/gudhi/bottleneck.cc b/src/python/gudhi/bottleneck.cc index 732cb9a8..59be6088 100644 --- a/src/python/gudhi/bottleneck.cc +++ b/src/python/gudhi/bottleneck.cc @@ -29,7 +29,8 @@ PYBIND11_MODULE(bottleneck, m) { py::arg("diagram_1"), py::arg("diagram_2"), py::arg("e") = (std::numeric_limits::min)(), R"pbdoc( - This function returns the point corresponding to a given vertex. + Compute the Bottleneck distance between two diagrams. + Points at infinity and on the diagonal are supported. :param diagram_1: The first diagram. :type diagram_1: numpy array of shape (m,2) diff --git a/src/python/gudhi/hera/bottleneck.cc b/src/python/gudhi/hera/bottleneck.cc index 846a3525..0cb562ce 100644 --- a/src/python/gudhi/hera/bottleneck.cc +++ b/src/python/gudhi/hera/bottleneck.cc @@ -40,6 +40,9 @@ PYBIND11_MODULE(bottleneck, m) { Compute the Bottleneck distance between two diagrams. Points at infinity are supported. + .. note:: + Points on the diagonal are not supported and must be filtered out before calling this function. + Parameters: X (n x 2 numpy array): First diagram Y (n x 2 numpy array): Second diagram -- cgit v1.2.3