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') 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') 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 From b50a41f53af6937c6f030d08f2b969b9024e17ac Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 12 Jun 2020 23:10:37 +0200 Subject: Mention pip package --- src/python/doc/installation.rst | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'src/python/doc') diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst index a66e910e..525ca84e 100644 --- a/src/python/doc/installation.rst +++ b/src/python/doc/installation.rst @@ -5,20 +5,47 @@ Installation ############ -Conda -***** -The easiest way to install the Python version of GUDHI is using -`conda `_. +Packages +******** +The easiest way to install the Python version of GUDHI is using pre-built packages. +We recommend `conda `_ + +.. code-block:: bash + + conda install -c conda-forge gudhi + +Gudhi is also available on `PyPI `_ + +.. code-block:: bash + + pip install gudhi + +Third party packages are also available, for instance on Debian or Ubuntu + +.. code-block:: bash + + apt install python3-gudhi + +In all cases, you may still want to install some of the optional `run time dependencies`_. Compiling ********* +These instructions are for people who want to compile gudhi from source, they are +unnecessary if you installed a binary package of Gudhi as above. They assume that +you have downloaded a `release `_, +with a name like `gudhi.3.2.0.tar.gz`, then run `tar xf gudhi.3.2.0.tar.gz`, which +created a directory `gudhi.3.2.0`, hereinafter referred to as `/path-to-gudhi/`. +If you are instead using a git checkout, beware that the paths are a bit +different, and in particular the `python/` subdirectory is actually `src/python/` +there. + The library uses c++14 and requires `Boost `_ :math:`\geq` 1.56.0, `CMake `_ :math:`\geq` 3.1 to generate makefiles, `NumPy `_, `Cython `_ and `pybind11 `_ to compile the GUDHI Python module. It is a multi-platform library and compiles on Linux, Mac OSX and Visual -Studio 2017. +Studio 2017 or later. On `Windows `_ , only Python :math:`\geq` 3.5 are available because of the required Visual Studio version. -- cgit v1.2.3