summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-30 21:04:22 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-30 21:04:22 +0000
commit01cfd13aa84317debb4bf681309533b693322131 (patch)
tree178bca6c0fabe13784c1fb695a1713d722c681d9 /src/common
parentd0aa6ea5b543c4692f6e42d12252b03d5e43a255 (diff)
parent1f1033f14cef0b5b602a23c9f35659fa0168f1b4 (diff)
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/python_2.1.0_fix_vincent@3495 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4033114216c767ad4028e3f6d4ccb5f5dfb88f78
Diffstat (limited to 'src/common')
-rw-r--r--src/common/doc/file_formats.h2
-rw-r--r--src/common/doc/installation.h5
-rw-r--r--src/common/doc/main_page.h18
-rw-r--r--src/common/example/CMakeLists.txt1
-rw-r--r--src/common/include/gudhi/Clock.h2
-rw-r--r--src/common/include/gudhi/Debug_utils.h2
-rw-r--r--src/common/include/gudhi/Null_output_iterator.h2
-rw-r--r--src/common/include/gudhi/Off_reader.h2
-rw-r--r--src/common/include/gudhi/Point.h2
-rw-r--r--src/common/include/gudhi/Points_3D_off_io.h2
-rw-r--r--src/common/include/gudhi/Points_off_io.h2
-rw-r--r--src/common/include/gudhi/Simple_object_pool.h2
-rw-r--r--src/common/include/gudhi/Unitary_tests_utils.h2
-rw-r--r--src/common/include/gudhi/allocator.h2
-rw-r--r--src/common/include/gudhi/console_color.h2
-rw-r--r--src/common/include/gudhi/distance_functions.h52
-rw-r--r--src/common/include/gudhi/graph_simplicial_complex.h8
-rw-r--r--src/common/include/gudhi/random_point_generators.h2
-rw-r--r--src/common/include/gudhi/reader_utils.h2
-rw-r--r--src/common/test/CMakeLists.txt1
-rw-r--r--src/common/test/test_distance_matrix_reader.cpp2
-rw-r--r--src/common/test/test_persistence_intervals_reader.cpp2
-rw-r--r--src/common/test/test_points_off_reader.cpp2
-rw-r--r--src/common/utilities/CMakeLists.txt1
-rw-r--r--src/common/utilities/off_file_from_shape_generator.cpp2
25 files changed, 96 insertions, 26 deletions
diff --git a/src/common/doc/file_formats.h b/src/common/doc/file_formats.h
index c60ed15a..523153b8 100644
--- a/src/common/doc/file_formats.h
+++ b/src/common/doc/file_formats.h
@@ -4,7 +4,7 @@
*
* Author(s): Clément Jamin
*
-* Copyright (C) 2017 INRIA
+* Copyright (C) 2017 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h
index 25675cc5..12407c18 100644
--- a/src/common/doc/installation.h
+++ b/src/common/doc/installation.h
@@ -5,8 +5,9 @@
* 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
- * more recent. It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015.
+ * The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> &ge; 1.48.0
+ * and <a target="_blank" href="https://www.cmake.org/">CMake</a> &ge; 3.1.
+ * It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015.
*
* \subsection demos Demos and examples
* To build the demos and examples, run the following commands in a terminal:
diff --git a/src/common/doc/main_page.h b/src/common/doc/main_page.h
index b3e9ea03..30d4e71b 100644
--- a/src/common/doc/main_page.h
+++ b/src/common/doc/main_page.h
@@ -42,6 +42,22 @@
</td>
</tr>
</table>
+ \subsection CechComplexDataStructure Čech complex
+ \image html "cech_complex_representation.png" "Čech complex representation"
+<table border="0">
+ <tr>
+ <td width="25%">
+ <b>Author:</b> Vincent Rouvreau<br>
+ <b>Introduced in:</b> GUDHI 2.2.0<br>
+ <b>Copyright:</b> GPL v3<br>
+ </td>
+ <td width="75%">
+ The Čech complex is a simplicial complex constructed from a proximity graph.<br>
+ The set of all simplices is filtered by the radius of their minimal enclosing ball.<br>
+ <b>User manual:</b> \ref cech_complex - <b>Reference manual:</b> Gudhi::cech_complex::Cech_complex
+ </td>
+ </tr>
+</table>
\subsection CubicalComplexDataStructure Cubical complex
\image html "Cubical_complex_representation.png" "Cubical complex representation"
<table border="0">
@@ -57,6 +73,7 @@
<b>User manual:</b> \ref cubical_complex - <b>Reference manual:</b> Gudhi::cubical_complex::Bitmap_cubical_complex
</td>
</tr>
+</table>
\subsection RipsComplexDataStructure Rips complex
\image html "rips_complex_representation.png" "Rips complex representation"
<table border="0">
@@ -75,7 +92,6 @@
</td>
</tr>
</table>
-</table>
\subsection SimplexTreeDataStructure Simplex tree
\image html "Simplex_tree_representation.png" "Simplex tree representation"
<table border="0">
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
index 1273c699..04015cdc 100644
--- a/src/common/example/CMakeLists.txt
+++ b/src/common/example/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.6)
project(Common_examples)
add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp )
diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h
index b83de2f5..cdf18cb2 100644
--- a/src/common/include/gudhi/Clock.h
+++ b/src/common/include/gudhi/Clock.h
@@ -4,7 +4,7 @@
*
* Author(s): David Salinas
*
- * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h
index 90d3cf47..3f5cb04f 100644
--- a/src/common/include/gudhi/Debug_utils.h
+++ b/src/common/include/gudhi/Debug_utils.h
@@ -4,7 +4,7 @@
*
* Author(s): David Salinas
*
- * Copyright (C) 2014 INRIA
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h
index 42e6e449..c700af5f 100644
--- a/src/common/include/gudhi/Null_output_iterator.h
+++ b/src/common/include/gudhi/Null_output_iterator.h
@@ -4,7 +4,7 @@
*
* Author(s): Marc Glisse
*
- * Copyright (C) 2017 INRIA
+ * Copyright (C) 2017 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Off_reader.h b/src/common/include/gudhi/Off_reader.h
index 32320e4d..024f0568 100644
--- a/src/common/include/gudhi/Off_reader.h
+++ b/src/common/include/gudhi/Off_reader.h
@@ -4,7 +4,7 @@
*
* Author(s): David Salinas
*
- * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Point.h b/src/common/include/gudhi/Point.h
index 0479e71e..345a8465 100644
--- a/src/common/include/gudhi/Point.h
+++ b/src/common/include/gudhi/Point.h
@@ -4,7 +4,7 @@
*
* Author(s): David Salinas
*
- * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Points_3D_off_io.h b/src/common/include/gudhi/Points_3D_off_io.h
index b0d24998..704f73a7 100644
--- a/src/common/include/gudhi/Points_3D_off_io.h
+++ b/src/common/include/gudhi/Points_3D_off_io.h
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2015 INRIA Saclay (France)
+ * Copyright (C) 2015 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Points_off_io.h b/src/common/include/gudhi/Points_off_io.h
index 08f324c6..38029658 100644
--- a/src/common/include/gudhi/Points_off_io.h
+++ b/src/common/include/gudhi/Points_off_io.h
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2015 INRIA Saclay (France)
+ * Copyright (C) 2015 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Simple_object_pool.h b/src/common/include/gudhi/Simple_object_pool.h
index fb9c8e23..47283521 100644
--- a/src/common/include/gudhi/Simple_object_pool.h
+++ b/src/common/include/gudhi/Simple_object_pool.h
@@ -4,7 +4,7 @@
*
* Author(s): Marc Glisse
*
- * Copyright (C) 2015 INRIA Saclay - Ile de France
+ * Copyright (C) 2015 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h
index 8394a062..e07c8d42 100644
--- a/src/common/include/gudhi/Unitary_tests_utils.h
+++ b/src/common/include/gudhi/Unitary_tests_utils.h
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2017 INRIA
+ * Copyright (C) 2017 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/allocator.h b/src/common/include/gudhi/allocator.h
index 4ede14e4..3de16a49 100644
--- a/src/common/include/gudhi/allocator.h
+++ b/src/common/include/gudhi/allocator.h
@@ -4,7 +4,7 @@
*
* Author(s): Marc Glisse
*
- * Copyright (C) 2015 INRIA Saclay - Ile de France
+ * Copyright (C) 2015 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/console_color.h b/src/common/include/gudhi/console_color.h
index c4671da3..a493e0d0 100644
--- a/src/common/include/gudhi/console_color.h
+++ b/src/common/include/gudhi/console_color.h
@@ -4,7 +4,7 @@
*
* Author(s): Clement Jamin
*
- * Copyright (C) 2016 INRIA Sophia-Antipolis (France)
+ * Copyright (C) 2016 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index 3a5d1fd5..4dfba1bf 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -4,7 +4,7 @@
*
* Author(s): Clément Maria
*
- * Copyright (C) 2014 INRIA
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,10 @@
#include <gudhi/Debug_utils.h>
+#include <gudhi/Miniball.hpp>
+
#include <boost/range/metafunctions.hpp>
+#include <boost/range/size.hpp>
#include <cmath> // for std::sqrt
#include <type_traits> // for std::decay
@@ -68,6 +71,53 @@ class Euclidean_distance {
}
};
+/** @brief Compute the radius of the minimal enclosing ball between Points given by a range of coordinates.
+ * The points are assumed to have the same dimension. */
+class Minimal_enclosing_ball_radius {
+ public:
+ /** \brief Minimal_enclosing_ball_radius from two points.
+ *
+ * @param[in] point_1 First point.
+ * @param[in] point_2 second point.
+ * @return The minimal enclosing ball radius for the two points (aka. Euclidean distance / 2.).
+ *
+ * \tparam Point must be a range of Cartesian coordinates.
+ *
+ */
+ template< typename Point >
+ typename std::iterator_traits<typename boost::range_iterator<Point>::type>::value_type
+ operator()(const Point& point_1, const Point& point_2) const {
+ return Euclidean_distance()(point_1, point_2) / 2.;
+ }
+ /** \brief Minimal_enclosing_ball_radius from a point cloud.
+ *
+ * @param[in] point_cloud The points.
+ * @return The minimal enclosing ball radius for the points.
+ *
+ * \tparam Point_cloud must be a range of points with Cartesian coordinates.
+ * Point_cloud is a range over a range of Coordinate.
+ *
+ */
+ template< typename Point_cloud,
+ typename Point_iterator = typename boost::range_const_iterator<Point_cloud>::type,
+ typename Point= typename std::iterator_traits<Point_iterator>::value_type,
+ typename Coordinate_iterator = typename boost::range_const_iterator<Point>::type,
+ typename Coordinate = typename std::iterator_traits<Coordinate_iterator>::value_type>
+ Coordinate
+ operator()(const Point_cloud& point_cloud) const {
+ using Min_sphere = Miniball::Miniball<Miniball::CoordAccessor<Point_iterator, Coordinate_iterator>>;
+
+ Min_sphere ms(boost::size(*point_cloud.begin()), point_cloud.begin(),point_cloud.end());
+#ifdef DEBUG_TRACES
+ std::cout << "Minimal_enclosing_ball_radius = " << std::sqrt(ms.squared_radius()) << " | nb points = "
+ << boost::size(point_cloud) << " | dimension = "
+ << boost::size(*point_cloud.begin()) << std::endl;
+#endif // DEBUG_TRACES
+
+ return std::sqrt(ms.squared_radius());
+ }
+};
+
} // namespace Gudhi
#endif // DISTANCE_FUNCTIONS_H_
diff --git a/src/common/include/gudhi/graph_simplicial_complex.h b/src/common/include/gudhi/graph_simplicial_complex.h
index d84421b2..49fe56cc 100644
--- a/src/common/include/gudhi/graph_simplicial_complex.h
+++ b/src/common/include/gudhi/graph_simplicial_complex.h
@@ -4,7 +4,7 @@
*
* Author(s): Clément Maria
*
- * Copyright (C) 2014 INRIA
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,6 +42,12 @@ struct vertex_filtration_t {
typedef boost::vertex_property_tag kind;
};
+/** \brief Proximity_graph contains the vertices and edges with their filtration values in order to store the result
+ * of `Gudhi::compute_proximity_graph` function.
+ *
+ * \tparam SimplicialComplexForProximityGraph furnishes `Filtration_value` type definition.
+ *
+ */
template <typename SimplicialComplexForProximityGraph>
using Proximity_graph = typename boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS
, boost::property < vertex_filtration_t, typename SimplicialComplexForProximityGraph::Filtration_value >
diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h
index 9df77760..1f8f2cd8 100644
--- a/src/common/include/gudhi/random_point_generators.h
+++ b/src/common/include/gudhi/random_point_generators.h
@@ -4,7 +4,7 @@
*
* Author(s): Clement Jamin
*
- * Copyright (C) 2016 INRIA
+ * Copyright (C) 2016 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h
index 90be4fc7..26eeb76d 100644
--- a/src/common/include/gudhi/reader_utils.h
+++ b/src/common/include/gudhi/reader_utils.h
@@ -4,7 +4,7 @@
*
* Author(s): Clement Maria, Pawel Dlotko, Clement Jamin
*
- * Copyright (C) 2014 INRIA
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt
index de3e765a..0b49fa1e 100644
--- a/src/common/test/CMakeLists.txt
+++ b/src/common/test/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.6)
project(Common_tests)
include(GUDHI_test_coverage)
diff --git a/src/common/test/test_distance_matrix_reader.cpp b/src/common/test/test_distance_matrix_reader.cpp
index 656e6f2e..6fee86e2 100644
--- a/src/common/test/test_distance_matrix_reader.cpp
+++ b/src/common/test/test_distance_matrix_reader.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2016 INRIA
+ * Copyright (C) 2016 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/test/test_persistence_intervals_reader.cpp b/src/common/test/test_persistence_intervals_reader.cpp
index be299376..b7ece9bd 100644
--- a/src/common/test/test_persistence_intervals_reader.cpp
+++ b/src/common/test/test_persistence_intervals_reader.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2017 INRIA
+ * Copyright (C) 2017 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/test/test_points_off_reader.cpp b/src/common/test/test_points_off_reader.cpp
index 0a78d190..ba3bab71 100644
--- a/src/common/test/test_points_off_reader.cpp
+++ b/src/common/test/test_points_off_reader.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2015
+ * Copyright (C) 2015 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/utilities/CMakeLists.txt b/src/common/utilities/CMakeLists.txt
index b3e4b436..7f1d1cd7 100644
--- a/src/common/utilities/CMakeLists.txt
+++ b/src/common/utilities/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.6)
project(off_file_from_shape_generator)
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
diff --git a/src/common/utilities/off_file_from_shape_generator.cpp b/src/common/utilities/off_file_from_shape_generator.cpp
index afcd558c..5e3da7f7 100644
--- a/src/common/utilities/off_file_from_shape_generator.cpp
+++ b/src/common/utilities/off_file_from_shape_generator.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2014 INRIA Saclay (France)
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by