summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-26 11:32:25 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-26 11:32:25 +0000
commit1208d423e700764a3453767886e6a3b4c0a09125 (patch)
tree3e938a2e1e984e80e1137fd30968e385068ec8e4 /src/common
parent6f9560fe6d6cca6c5a0de35fcf7938912e103930 (diff)
parent6ed42daddfede2288bc02ab2e98fc12b47cac74e (diff)
merge from trunk
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/farthest_distance@2244 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7d261d59dae839dd5de8f6a03c5a167d015f7d85
Diffstat (limited to 'src/common')
-rw-r--r--src/common/doc/header.html24
-rw-r--r--src/common/doc/main_page.h83
-rw-r--r--src/common/example/CMakeLists.txt14
-rw-r--r--src/common/include/gudhi/distance_functions.h4
4 files changed, 96 insertions, 29 deletions
diff --git a/src/common/doc/header.html b/src/common/doc/header.html
index a6f3ed9c..94e641b2 100644
--- a/src/common/doc/header.html
+++ b/src/common/doc/header.html
@@ -9,7 +9,7 @@
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<!-- GUDHI website css for header BEGIN -->
-<link rel="stylesheet" type="text/css" href="http://gudhi.gforge.inria.fr/assets/css/styles_feeling_responsive.css" />
+<link rel="stylesheet" type="text/css" href="http://pages.saclay.inria.fr/vincent.rouvreau/gudhi/gudhi-doc-2.0.0/assets/css/styles_feeling_responsive.css" />
<!-- GUDHI website css for header END -->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
@@ -25,6 +25,13 @@ $extrastylesheet
<!-- GUDHI website header BEGIN -->
<div id="navigation" class="sticky">
<nav class="top-bar" role="navigation" data-topbar>
+ <ul class="title-area">
+ <li class="name">
+ <h1 class="show-for-small-only"><a href="http://gudhi.gforge.inria.fr" class="icon-tree"> GUDHI C++ library</a></h1>
+ </li>
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Navigation</span></a></li>
+ </ul>
<section class="top-bar-section">
<ul class="right">
<li class="divider"></li>
@@ -37,7 +44,7 @@ $extrastylesheet
<a href="#">Project</a>
<ul class="dropdown">
<li><a href="http://gudhi.gforge.inria.fr/people/">People</a></li>
- <li><a href="http://gudhi.gforge.inria.fr/getinvolved/">Get involved</a></li>
+ <li><a href="http://gudhi.gforge.inria.fr/keepintouch/">Keep in touch</a></li>
<li><a href="http://gudhi.gforge.inria.fr/partners/">Partners and Funding</a></li>
<li><a href="http://gudhi.gforge.inria.fr/relatedprojects/">Related projects</a></li>
<li><a href="http://gudhi.gforge.inria.fr/theyaretalkingaboutus/">They are talking about us</a></li>
@@ -49,11 +56,18 @@ $extrastylesheet
<ul class="dropdown">
<li><a href="http://gudhi.gforge.inria.fr/licensing/">Licensing</a></li>
<li><a href="https://gforge.inria.fr/frs/?group_id=3865" target="_blank">Get the sources</a></li>
- <li><a href="http://gudhi.gforge.inria.fr/doc/latest/installation.html">Installation manual</a></li>
</ul>
</li>
<li class="divider"></li>
- <li><a href="http://gudhi.gforge.inria.fr/doc/latest/">Documentation</a></li>
+ <li class="has-dropdown">
+ <a href="#">Documentation</a>
+ <ul class="dropdown">
+ <li><a href="http://gudhi.gforge.inria.fr/doc/latest/">C++ documentation</a></li>
+ <li><a href="http://gudhi.gforge.inria.fr/doc/latest/installation.html">C++ installation manual</a></li>
+ <li><a href="http://gudhi.gforge.inria.fr/cython/latest/">Cython documentation</a></li>
+ <li><a href="http://gudhi.gforge.inria.fr/cython/latest/installation.html">Cython installation manual</a></li>
+ </ul>
+ </li>
<li class="divider"></li>
<li><a href="http://gudhi.gforge.inria.fr/interfaces/">Interfaces</a></li>
<li class="divider"></li>
@@ -62,7 +76,7 @@ $extrastylesheet
</nav>
</div><!-- /#navigation -->
<!-- GUDHI website header BEGIN -->
-
+
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h
index 60c9cd07..e6f29fa8 100644
--- a/src/common/doc/main_page.h
+++ b/src/common/doc/main_page.h
@@ -3,7 +3,9 @@
* \image html "Gudhi_banner.png" "" width=20cm
*
* \section Introduction Introduction
- * The Gudhi library (Geometry Understanding in Higher Dimensions) is a generic open source C++ library for
+ * The GUDHI library (Geometry Understanding in Higher Dimensions) is a generic open source
+ * <a class="el" target="_blank" href="http://gudhi.gforge.inria.fr/doc/latest/">C++ library</a>, with a
+ * <a class="el" target="_blank" href="http://gudhi.gforge.inria.fr/cython/latest/">Cython interface</a>, for
* Computational Topology and Topological Data Analysis
* (<a class="el" target="_blank" href="https://en.wikipedia.org/wiki/Topological_data_analysis">TDA</a>).
* The GUDHI library intends to help the development of new algorithmic solutions in TDA and their transfer to
@@ -62,7 +64,7 @@
<tr>
<td width="25%">
<b>Author:</b> Cl&eacute;ment Maria, Pawel Dlotko, Vincent Rouvreau<br>
- <b>Introduced in:</b> GUDHI 1.4.0<br>
+ <b>Introduced in:</b> GUDHI 2.0.0<br>
<b>Copyright:</b> GPL v3<br>
</td>
<td width="75%">
@@ -118,8 +120,9 @@
<tr>
<td width="25%">
<b>Author:</b> Cl&eacute;ment Jamin<br>
- <b>Introduced in:</b> GUDHI 1.4.0<br>
+ <b>Introduced in:</b> GUDHI 2.0.0<br>
<b>Copyright:</b> GPL v3<br>
+ <b>Requires:</b> \ref cgal &ge; 4.8.1 and \ref eigen3
</td>
<td width="75%">
A Tangential Delaunay complex is a <a target="_blank" href="https://en.wikipedia.org/wiki/Simplicial_complex">simplicial complex</a>
@@ -139,6 +142,7 @@
<b>Author:</b> Siargey Kachanovich<br>
<b>Introduced in:</b> GUDHI 1.3.0<br>
<b>Copyright:</b> GPL v3<br>
+ <b>Euclidean version requires:</b> \ref cgal &ge; 4.6.0 and \ref eigen3
</td>
<td width="75%">
Witness complex \f$ Wit(W,L) \f$ is a simplicial complex defined on two sets of points in \f$\mathbb{R}^D\f$.
@@ -155,9 +159,9 @@
<tr>
<td width="25%">
<b>Author:</b> Fran&ccedil;ois Godi<br>
- <b>Introduced in:</b> GUDHI 1.4.0<br>
+ <b>Introduced in:</b> GUDHI 2.0.0<br>
<b>Copyright:</b> GPL v3<br>
- <b>Requires:</b> \ref cgal &ge; 4.8.0 and \ref eigen3
+ <b>Requires:</b> \ref cgal &ge; 4.8.1 and \ref eigen3
</td>
<td width="75%">
Bottleneck distance measures the similarity between two persistence diagrams.
@@ -211,11 +215,11 @@
</table>
*/
-/*! \page installation Gudhi installation
+/*! \page installation GUDHI installation
* \tableofcontents
- * As Gudhi is a header only library, there is no need to install the library.
+ * As GUDHI is a header only library, there is no need to install the library.
*
- * Examples of Gudhi headers inclusion can be found in \ref demos.
+ * Examples of GUDHI headers inclusion can be found in \ref demos.
*
* \section compiling Compiling
* The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> with version 1.48.0 or
@@ -234,6 +238,15 @@ make \endverbatim
* To test your build, run the following command in a terminal:
* \verbatim make test \endverbatim
*
+ * \subsection documentationgeneration Documentation
+ * To generate the documentation, <a target="_blank" href="http://www.doxygen.org/">Doxygen</a> is required.
+ * Run the following command in a terminal:
+\verbatim
+make doxygen
+# Documentation will be generated in the folder YYYY-MM-DD-hh-mm-ss_GUDHI_X.Y.Z/doc/html/
+# You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder`
+\endverbatim
+ *
* \section optionallibrary Optional third-party library
* \subsection gmp GMP
* The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision
@@ -249,6 +262,10 @@ make \endverbatim
* \subsection cgal CGAL
* The \ref alpha_complex data structure, \ref bottleneck_distance, and few examples requires CGAL, which is a C++
* library which provides easy access to efficient and reliable geometric algorithms.
+ *
+ * \note There is no need to install CGAL, you can just <CODE>cmake . && make</CODE> CGAL (or even
+ * <CODE>cmake -DCGAL_HEADER_ONLY=ON .</CODE> for CGAL version &ge; 4.8.0), thereafter you will be able to compile
+ * GUDHI by calling <CODE>cmake -DCGAL_DIR=/your/path/to/CGAL-X.Y .. && make</CODE>
*
* Having CGAL version 4.4.0 or higher installed is recommended. The procedure to install this library according to
* your operating system is detailed here http://doc.cgal.org/latest/Manual/installation.html
@@ -257,6 +274,10 @@ make \endverbatim
* Library</a> (CGAL \cite cgal:eb-15b) and will not be built if CGAL is not installed:
* \li <a href="_persistent_cohomology_2alpha_complex_3d_persistence_8cpp-example.html">
* Persistent_cohomology/alpha_complex_3d_persistence.cpp</a>
+ * \li <a href="_persistent_cohomology_2exact_alpha_complex_3d_persistence_8cpp-example.html">
+ * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp</a>
+ * \li <a href="_persistent_cohomology_2weighted_alpha_complex_3d_persistence_8cpp-example.html">
+ * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp</a>
* \li <a href="_simplex_tree_2example_alpha_shapes_3_simplex_tree_from_off_file_8cpp-example.html">
* Simplex_tree/example_alpha_shapes_3_simplex_tree_from_off_file.cpp</a>
*
@@ -276,11 +297,27 @@ make \endverbatim
* \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html">
* Persistent_cohomology/custom_persistence_sort.cpp</a>
*
- * The following example requires CGAL version &ge; 4.8.0:
- * \li <a href="_bottleneck_distance_2_bottleneck_basic_example_8cpp-example.html">
+ * The following example requires CGAL version &ge; 4.8.1:
+ * \li <a href="_bottleneck_distance_2alpha_rips_persistence_bottleneck_distance_8cpp-example.html">
+ * Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp.cpp</a>
+ * \li <a href="_bottleneck_distance_2bottleneck_basic_example_8cpp-example.html">
* Bottleneck_distance/bottleneck_basic_example.cpp</a>
- * \li <a href="_bottleneck_distance_2_bottleneck_read_file_example_8cpp-example.html">
+ * \li <a href="_bottleneck_distance_2bottleneck_read_file_example_8cpp-example.html">
* Bottleneck_distance/bottleneck_read_file_example.cpp</a>
+ * \li <a href="_spatial_searching_2example_spatial_searching_8cpp-example.html">
+ * Spatial_searching/example_spatial_searching.cpp</a>
+ * \li <a href="_subsampling_2example_choose_n_farthest_points_8cpp-example.html">
+ * Subsampling/example_choose_n_farthest_points.cpp</a>
+ * \li <a href="_subsampling_2example_custom_kernel_8cpp-example.html">
+ * Subsampling/example_custom_kernel.cpp</a>
+ * \li <a href="_subsampling_2example_pick_n_random_points_8cpp-example.html">
+ * Subsampling/example_pick_n_random_points.cpp</a>
+ * \li <a href="_subsampling_2example_sparsify_point_set_8cpp-example.html">
+ * Subsampling/example_sparsify_point_set.cpp</a>
+ * \li <a href="_tangential_complex_2example_basic_8cpp-example.html">
+ * Tangential_complex/example_basic.cpp</a>
+ * \li <a href="_tangential_complex_2example_with_perturb_8cpp-example.html">
+ * Tangential_complex/example_with_perturb.cpp</a>
*
* \subsection eigen3 Eigen3
* The \ref alpha_complex data structure and few examples requires
@@ -348,6 +385,10 @@ make \endverbatim
* Persistent_cohomology/rips_persistence.cpp</a>
* \li <a href="_persistent_cohomology_2rips_persistence_step_by_step_8cpp-example.html">
* Persistent_cohomology/rips_persistence_step_by_step.cpp</a>
+ * \li <a href="_persistent_cohomology_2exact_alpha_complex_3d_persistence_8cpp-example.html">
+ * Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp</a>
+ * \li <a href="_persistent_cohomology_2weighted_alpha_complex_3d_persistence_8cpp-example.html">
+ * Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp</a>
* \li <a href="_persistent_cohomology_2periodic_alpha_complex_3d_persistence_8cpp-example.html">
* Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp</a>
* \li <a href="_persistent_cohomology_2custom_persistence_sort_8cpp-example.html">
@@ -361,7 +402,7 @@ make \endverbatim
* Please help us improving the quality of the GUDHI library. You may report bugs or suggestions to:
* \verbatim Contact: gudhi-users@lists.gforge.inria.fr \endverbatim
*
- * Gudhi is open to external contributions. If you want to join our development team, please contact us.
+ * GUDHI is open to external contributions. If you want to join our development team, please contact us.
*
*/
@@ -376,10 +417,11 @@ make \endverbatim
* \verbinclude biblio/how_to_cite_gudhi.bib
*/
-// List of Gudhi examples - Doxygen needs at least a file tag to analyse comments
+// List of GUDHI examples - Doxygen needs at least a file tag to analyse comments
/*! @file Examples
* @example Alpha_complex/Alpha_complex_from_off.cpp
* @example Alpha_complex/Alpha_complex_from_points.cpp
+ * @example Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp
* @example Bottleneck_distance/bottleneck_basic_example.cpp
* @example Bottleneck_distance/bottleneck_read_file_example.cpp
* @example Bitmap_cubical_complex/Bitmap_cubical_complex.cpp
@@ -392,6 +434,8 @@ make \endverbatim
* @example Persistent_cohomology/alpha_complex_3d_persistence.cpp
* @example Persistent_cohomology/alpha_complex_persistence.cpp
* @example Persistent_cohomology/rips_persistence_via_boundary_matrix.cpp
+ * @example Persistent_cohomology/exact_alpha_complex_3d_persistence.cpp
+ * @example Persistent_cohomology/weighted_alpha_complex_3d_persistence.cpp
* @example Persistent_cohomology/periodic_alpha_complex_3d_persistence.cpp
* @example Persistent_cohomology/persistence_from_file.cpp
* @example Persistent_cohomology/persistence_from_simple_simplex_tree.cpp
@@ -410,9 +454,18 @@ make \endverbatim
* @example Skeleton_blocker/Skeleton_blocker_from_simplices.cpp
* @example Skeleton_blocker/Skeleton_blocker_iteration.cpp
* @example Skeleton_blocker/Skeleton_blocker_link.cpp
+ * @example Spatial_searching/example_spatial_searching.cpp
+ * @example Subsampling/example_choose_n_farthest_points.cpp
+ * @example Subsampling/example_custom_kernel.cpp
+ * @example Subsampling/example_pick_n_random_points.cpp
+ * @example Subsampling/example_sparsify_point_set.cpp
* @example Tangential_complex/example_basic.cpp
* @example Tangential_complex/example_with_perturb.cpp
- * @example Witness_complex/witness_complex_from_file.cpp
- * @example Witness_complex/witness_complex_sphere.cpp
+ * @example Witness_complex/example_nearest_landmark_table.cpp
+ * @example Witness_complex/example_strong_witness_complex_off.cpp
+ * @example Witness_complex/example_strong_witness_persistence.cpp
+ * @example Witness_complex/example_witness_complex_off.cpp
+ * @example Witness_complex/example_witness_complex_persistence.cpp
+ * @example Witness_complex/example_witness_complex_sphere.cpp
*/
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
index b0c6d69a..61c94391 100644
--- a/src/common/example/CMakeLists.txt
+++ b/src/common/example/CMakeLists.txt
@@ -10,12 +10,10 @@ if(CGAL_FOUND)
target_link_libraries(cgal_3D_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
add_test(cgal_3D_off_reader ${CMAKE_CURRENT_BINARY_DIR}/cgal_3D_off_reader ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off)
- # need CGAL 4.7
- if (NOT CGAL_VERSION VERSION_LESS 4.7.0)
- if (EIGEN3_FOUND)
- add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
- target_link_libraries(cgal_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
- add_test(cgal_off_reader ${CMAKE_CURRENT_BINARY_DIR}/cgal_off_reader ${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off)
- endif(EIGEN3_FOUND)
- endif (NOT CGAL_VERSION VERSION_LESS 4.7.0)
+ # need CGAL 4.7and Eigen3
+ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
+ add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
+ target_link_libraries(cgal_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
+ add_test(cgal_off_reader ${CMAKE_CURRENT_BINARY_DIR}/cgal_off_reader ${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off)
+ endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
endif()
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index 5891ef0e..22747637 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -24,6 +24,8 @@
#define DISTANCE_FUNCTIONS_H_
#include <cmath> // for std::sqrt
+#include <type_traits> // for std::decay
+#include <iterator> // for std::begin, std::end
/** @file
* @brief Global distance functions
@@ -34,7 +36,7 @@
class Euclidean_distance {
public:
template< typename Point >
- auto operator()(const Point& p1, const Point& p2) -> typename std::decay<decltype(*std::begin(p1))>::type {
+ auto operator()(const Point& p1, const Point& p2) const -> typename std::decay<decltype(*std::begin(p1))>::type {
auto it1 = p1.begin();
auto it2 = p2.begin();
typename Point::value_type dist = 0.;