summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-06 09:13:33 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-06 09:13:33 +0000
commit223b9334d8e71be1ef1e0279c128201d9faa18f7 (patch)
tree1c70e5f83a8dae753f923af9db18a2dc19bd9795 /src/common
parent75d2050ff37aa56fd4c1473bb6ccd8e533b55558 (diff)
parent11c6ce22ef17bb41f484d5f5aeb1acb34b9c28ea (diff)
Merge C++ version of persistence representation
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration_bis@3043 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 6421c7cbe670fad1a8900ccc0ea6ff32297dd5e7
Diffstat (limited to 'src/common')
-rw-r--r--src/common/doc/main_page.h21
-rw-r--r--src/common/include/gudhi/distance_functions.h5
2 files changed, 25 insertions, 1 deletions
diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h
index 72ef191d..108cf6e3 100644
--- a/src/common/doc/main_page.h
+++ b/src/common/doc/main_page.h
@@ -170,6 +170,7 @@
</table>
\section Toolbox Toolbox
+
\subsection BottleneckDistanceToolbox Bottleneck distance
\image html "perturb_pd.png" "Bottleneck distance is the length of the longest edge"
<table border="0">
@@ -229,7 +230,25 @@
<b>User manual:</b> \ref persistent_cohomology - <b>Reference manual:</b> Gudhi::persistent_cohomology::Persistent_cohomology
</td>
</tr>
+</table>
+ \subsection PersistenceRepresentationsToolbox Persistence representations
+ \image html "average_landscape.png" "Persistence representations"
+<table border="0">
+ <tr>
+ <td width="25%">
+ <b>Author:</b> Pawel Dlotko<br>
+ <b>Introduced in:</b> GUDHI 2.1.0<br>
+ <b>Copyright:</b> GPL v3<br>
+ </td>
+ <td width="75%">
+ It contains implementation of various representations of persistence diagrams; diagrams themselves, persistence
+ landscapes (rigorous and grid version), persistence heath maps, vectors and others. It implements basic
+ functionalities which are neccessary to use persistence in statistics and machine learning.<br>
+ <b>User manual:</b> \ref Persistence_representations
+ </td>
+ </tr>
</table>
+
*/
/*! \page installation GUDHI installation
@@ -532,4 +551,4 @@ make doxygen
* @example Witness_complex/weak_witness_persistence.cpp
* @example Witness_complex/strong_witness_persistence.cpp
*/
-
+ \ No newline at end of file
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index f6e2ab5a..c556155e 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -26,6 +26,7 @@
#include <cmath> // for std::sqrt
#include <type_traits> // for std::decay
#include <iterator> // for std::begin, std::end
+#include <utility>
namespace Gudhi {
@@ -48,6 +49,10 @@ class Euclidean_distance {
}
return std::sqrt(dist);
}
+ template< typename T >
+ T operator() (const std::pair< T, T >& f, const std::pair< T, T >& s) {
+ return sqrt((f.first-s.first)*(f.first-s.first) + (f.second-s.second)*(f.second-s.second));
+ }
};
} // namespace Gudhi