summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-02-05 07:43:52 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-02-05 07:43:52 +0100
commit8e888b8be306c32c561396ca80b47a0aa9f9f859 (patch)
treec745eca4eeeeeac45551e80e3732b78e42759c7c
parentbf4b4eeda9762ed9e99c2b24f19331fa0111fcfe (diff)
parent33540d9b4c4d320ee1482d876a10200d89ff4f49 (diff)
Merge last master modification and fix merge conflict
-rw-r--r--Dockerfile_gudhi_installation10
-rw-r--r--src/Nerve_GIC/include/gudhi/GIC.h8
-rw-r--r--src/Simplex_tree/example/CMakeLists.txt3
-rw-r--r--src/Tangential_complex/include/gudhi/Tangential_complex.h4
-rw-r--r--src/Witness_complex/example/CMakeLists.txt10
-rw-r--r--src/python/doc/alpha_complex_sum.inc15
6 files changed, 30 insertions, 20 deletions
diff --git a/Dockerfile_gudhi_installation b/Dockerfile_gudhi_installation
index 9fe20730..d5d86338 100644
--- a/Dockerfile_gudhi_installation
+++ b/Dockerfile_gudhi_installation
@@ -50,14 +50,16 @@ RUN pip3 install \
numpy \
matplotlib \
scipy \
- Cython
+ Cython \
+ POT \
+ scikit-learn
# apt clean up
RUN apt autoremove && rm -rf /var/lib/apt/lists/*
-RUN curl -LO "https://github.com/GUDHI/gudhi-devel/releases/download/tags%2Fgudhi-release-3.0.0/gudhi.3.0.0.tar.gz" \
-&& tar xf gudhi.3.0.0.tar.gz \
-&& cd gudhi.3.0.0 \
+RUN curl -LO "https://github.com/GUDHI/gudhi-devel/releases/download/tags%2Fgudhi-release-3.1.0/gudhi.3.1.0.tar.gz" \
+&& tar xf gudhi.3.1.0.tar.gz \
+&& cd gudhi.3.1.0 \
&& mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_PYTHON=OFF -DPython_ADDITIONAL_VERSIONS=3 .. \
&& make all test install \
&& cmake -DWITH_GUDHI_PYTHON=ON . \
diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h
index ab099c04..61db6508 100644
--- a/src/Nerve_GIC/include/gudhi/GIC.h
+++ b/src/Nerve_GIC/include/gudhi/GIC.h
@@ -14,7 +14,7 @@
#ifdef GUDHI_USE_TBB
#include <tbb/parallel_for.h>
-#include <tbb/mutex.h>
+#include <mutex>
#endif
#include <gudhi/Debug_utils.h>
@@ -459,7 +459,7 @@ class Cover_complex {
// This cannot be parallelized if thread_local is not defined
// thread_local is not defined for XCode < v.8
#if defined(GUDHI_USE_TBB) && defined(GUDHI_CAN_USE_CXX11_THREAD_LOCAL)
- tbb::mutex deltamutex;
+ std::mutex deltamutex;
tbb::parallel_for(0, N, [&](int i){
std::vector<int> samples(m);
SampleWithoutReplacement(n, m, samples);
@@ -765,7 +765,7 @@ class Cover_complex {
#ifdef GUDHI_USE_TBB
if (verbose) std::clog << "Computing connected components (parallelized)..." << std::endl;
- tbb::mutex covermutex, idmutex;
+ std::mutex covermutex, idmutex;
tbb::parallel_for(0, res, [&](int i){
// Compute connected components
Graph G = one_skeleton.create_subgraph();
@@ -895,7 +895,7 @@ class Cover_complex {
// Compute the geodesic distances to subsamples with Dijkstra
#ifdef GUDHI_USE_TBB
if (verbose) std::clog << "Computing geodesic distances (parallelized)..." << std::endl;
- tbb::mutex coverMutex; tbb::mutex mindistMutex;
+ std::mutex coverMutex; tbb::mutex mindistMutex;
tbb::parallel_for(0, m, [&](int i){
int seed = voronoi_subsamples[i];
std::vector<double> dmap(n);
diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt
index f99b164c..8a8cac58 100644
--- a/src/Simplex_tree/example/CMakeLists.txt
+++ b/src/Simplex_tree/example/CMakeLists.txt
@@ -16,6 +16,9 @@ endif()
add_test(NAME Simplex_tree_example_simple_simplex_tree COMMAND $<TARGET_FILE:Simplex_tree_example_simple_simplex_tree>)
add_executable ( Simplex_tree_example_mini_simplex_tree mini_simplex_tree.cpp )
+if (TBB_FOUND)
+ target_link_libraries(Simplex_tree_example_mini_simplex_tree ${TBB_LIBRARIES})
+endif()
add_test(NAME Simplex_tree_example_mini_simplex_tree COMMAND $<TARGET_FILE:Simplex_tree_example_mini_simplex_tree>)
# An example with Simplex-tree using CGAL alpha_shapes_3
diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h
index f058fa9f..f007bdd5 100644
--- a/src/Tangential_complex/include/gudhi/Tangential_complex.h
+++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h
@@ -60,7 +60,7 @@
#ifdef GUDHI_USE_TBB
#include <tbb/parallel_for.h>
#include <tbb/combinable.h>
-#include <tbb/mutex.h>
+#include <mutex>
#endif
// #define GUDHI_TC_EXPORT_NORMALS // Only for 3D surfaces (k=2, d=3)
@@ -147,7 +147,7 @@ class Tangential_complex {
typedef typename Tr_traits::Vector_d Tr_vector;
#if defined(GUDHI_USE_TBB)
- typedef tbb::mutex Mutex_for_perturb;
+ typedef std::mutex Mutex_for_perturb;
typedef Vector Translation_for_perturb;
typedef std::vector<Atomic_wrapper<FT> > Weights;
#else
diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt
index 5860f3a3..2659798e 100644
--- a/src/Witness_complex/example/CMakeLists.txt
+++ b/src/Witness_complex/example/CMakeLists.txt
@@ -12,10 +12,18 @@ install(TARGETS Witness_complex_example_nearest_landmark_table DESTINATION bin)
# CGAL and Eigen3 are required for Euclidean version of Witness
if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
add_executable( Witness_complex_example_off example_witness_complex_off.cpp )
+ if (TBB_FOUND)
+ target_link_libraries(Witness_complex_example_off ${TBB_LIBRARIES})
+ endif()
add_executable ( Witness_complex_example_sphere example_witness_complex_sphere.cpp )
+ if (TBB_FOUND)
+ target_link_libraries(Witness_complex_example_sphere ${TBB_LIBRARIES})
+ endif()
add_executable( Witness_complex_example_strong_off example_strong_witness_complex_off.cpp )
- target_link_libraries(Witness_complex_example_strong_off)
+ if (TBB_FOUND)
+ target_link_libraries(Witness_complex_example_strong_off ${TBB_LIBRARIES})
+ endif()
add_test(NAME Witness_complex_example_off_test_torus
COMMAND $<TARGET_FILE:Witness_complex_example_off>
diff --git a/src/python/doc/alpha_complex_sum.inc b/src/python/doc/alpha_complex_sum.inc
index a1184663..b5af0d27 100644
--- a/src/python/doc/alpha_complex_sum.inc
+++ b/src/python/doc/alpha_complex_sum.inc
@@ -5,16 +5,13 @@
| .. figure:: | Alpha complex is a simplicial complex constructed from the finite | :Author: Vincent Rouvreau |
| ../../doc/Alpha_complex/alpha_complex_representation.png | cells of a Delaunay Triangulation. | |
| :alt: Alpha complex representation | | :Introduced in: GUDHI 2.0.0 |
- | :figclass: align-center | The filtration value of each simplex is computed as the square of the | |
- | | circumradius of the simplex if the circumsphere is empty (the simplex | :Copyright: MIT (`GPL v3 </licensing/>`_) |
- | | is then said to be Gabriel), and as the minimum of the filtration | |
- | | values of the codimension 1 cofaces that make it not Gabriel | :Requires: `Eigen <installation.html#eigen>`__ :math:`\geq` 3.1.0 and `CGAL <installation.html#cgal>`__ :math:`\geq` 4.11.0 |
- | | otherwise. All simplices that have a filtration value | |
- | | :math:`> \alpha^2` are removed from the Delaunay complex | |
- | | when creating the simplicial complex if it is specified. | |
+ | :figclass: align-center | The filtration value of each simplex is computed as the **square** of | |
+ | | the circumradius of the simplex if the circumsphere is empty (the | :Copyright: MIT (`GPL v3 </licensing/>`_) |
+ | | simplex is then said to be Gabriel), and as the minimum of the | |
+ | | filtration values of the codimension 1 cofaces that make it not | :Requires: `Eigen <installation.html#eigen>`__ :math:`\geq` 3.1.0 and `CGAL <installation.html#cgal>`__ :math:`\geq` 4.11.0 |
+ | | Gabriel otherwise. | |
| | | |
- | | This package requires having CGAL version 4.7 or higher (4.8.1 is | |
- | | advised for better performance). | |
+ | | For performances reasons, it is advised to use CGAL ≥ 5.0.0. | |
+----------------------------------------------------------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
| * :doc:`alpha_complex_user` | * :doc:`alpha_complex_ref` |
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+