summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/doc/main_page.h13
-rw-r--r--src/common/include/gudhi/distance_functions.h5
2 files changed, 12 insertions, 6 deletions
diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h
index d1cb691c..6986a6b5 100644
--- a/src/common/doc/main_page.h
+++ b/src/common/doc/main_page.h
@@ -212,19 +212,20 @@
</td>
</tr>
</table>
- \subsection Gudhi_stat_sublibrary Gudhi statistical sublibrary
- \image html "average_landscape.png" "Gudhi statistical sublibrary"
+ \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.0.0<br>
+ <b>Introduced in:</b> GUDHI 2.1.0<br>
<b>Copyright:</b> GPL v3<br>
</td>
<td width="75%">
- This is a statistical library for gudhi. It contain 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.
- <b>User manual:</b> \ref Gudhi_stat
+ It contain 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>
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index f6e2ab5a..f683136b 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -48,6 +48,11 @@ 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