Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
04b8fb8
add files
MClemot Sep 10, 2025
8333408
generators + warning corrections
MClemot Sep 11, 2025
4d8c881
code reorganisation
MClemot Sep 11, 2025
c2e7f12
Merge branch 'dev' of github.com:topology-tool-kit/ttk into DelRips3
MClemot Sep 12, 2025
c7f5a3e
added 2-dimensional generators
MClemot Sep 15, 2025
99c4eb6
TBB support + hashmap macro
MClemot Sep 16, 2025
66fa068
num of threads control + several filter input types
MClemot Oct 1, 2025
865429d
PH2 generators performance improvement
MClemot Oct 1, 2025
7777f89
macro -> using
MClemot Oct 2, 2025
c19b906
fix when not enough points
MClemot Oct 9, 2025
66419ed
handling non static dimension
MClemot Oct 30, 2025
facdc74
minor changes
MClemot Oct 31, 2025
13dfadd
max function
MClemot Nov 3, 2025
bf5d645
Merge branch 'dev' of github.com:topology-tool-kit/ttk into DelRips3
MClemot Nov 24, 2025
0d66b7c
Merge branch 'dev' of github.com:topology-tool-kit/ttk into DelRips3
MClemot Nov 26, 2025
6c38cd5
renamed macro
MClemot Nov 27, 2025
08a78cc
parallel d-dim delRips
MClemot Dec 17, 2025
7cacd02
parallel DisjointSet file
MClemot Dec 17, 2025
2469b88
parallel 3d delrips
MClemot Dec 17, 2025
7325531
correction when non-compiled dim and multi-thread
MClemot Dec 17, 2025
70194d1
format
MClemot Dec 17, 2025
1099ebf
removed using namespace in header
MClemot Dec 17, 2025
9bbf072
namespaces
MClemot Dec 17, 2025
2a91855
test eigen@3 instead of eigen in brew
MClemot Dec 17, 2025
694721c
correct eigen target
MClemot Dec 17, 2025
4b10e64
try remove version
MClemot Dec 17, 2025
3088951
find_dependency
MClemot Dec 17, 2025
e33e007
fix find_dependency
MClemot Dec 17, 2025
b3892e3
try fix Eigen3 dependency
MClemot Dec 18, 2025
74c950b
Merge branch 'dev' of https://github.com/topology-tool-kit/ttk into D…
julien-tierny Jan 2, 2026
e40079b
[ci] tbb for parallel 3d Delaunay
MClemot Jan 5, 2026
fdb67a1
fix minimal Boost version for concurrent hashmap
MClemot Jan 5, 2026
8fbd603
simplex maximum dimension -> homology maximum dimension
MClemot Jan 6, 2026
6494d2e
infinite PH0 pair
MClemot Jan 6, 2026
d42bd69
[ci] adding 3rd party package dep
julien-tierny Jan 8, 2026
49bcded
[delRips] updated ChangeLog
julien-tierny Jan 8, 2026
da33813
[delRips] updated ChangeLog (bis)
julien-tierny Jan 8, 2026
4248422
[doc] add links to DelRips online example
julien-tierny Jan 10, 2026
7b8b310
[ci] disabling tbb on macos (openmp issue?)
julien-tierny Jan 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
libeigen3-dev \
libgraphviz-dev \
libsqlite3-dev \
libtbb-dev \
libgl1-mesa-dev \
libwebsocketpp-dev \
graphviz \
Expand Down Expand Up @@ -202,7 +203,7 @@ jobs:
brew install --cask xquartz
brew install mesa glew qt@5 ninja libomp
# TTK dependencies
brew install boost cgal eigen graphviz spectra sqlite zlib numpy qhull
brew install boost cgal eigen graphviz spectra sqlite tbb zlib numpy qhull
- name: Install and setup sccache
uses: f3d-app/sccache-setup-action@v1
Expand Down Expand Up @@ -290,7 +291,7 @@ jobs:
brew install --cask xquartz
brew install mesa glew qt@5 ninja libomp
# TTK dependencies
brew install boost cgal eigen graphviz spectra sqlite zlib numpy qhull
brew install boost cgal eigen graphviz spectra sqlite tbb zlib numpy qhull
- name: Install and setup sccache
uses: f3d-app/sccache-setup-action@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
brew install --cask xquartz
brew install ninja open-mpi libomp
# TTK dependencies
brew install boost cgal eigen graphviz spectra sqlite numpy qhull
brew install boost cgal eigen graphviz spectra sqlite tbb numpy qhull
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
Expand Down Expand Up @@ -87,6 +87,7 @@ jobs:
-DTTK_ENABLE_MPI=FALSE \
-DTTK_ENABLE_CPU_OPTIMIZATION=FALSE \
-DTTK_ENABLE_SHARED_BASE_LIBRARIES=TRUE \
-DTTK_ENABLE_TBB=FALSE \
-DTTK_IMPLICIT_PRECONDITIONS_THRESHOLD=64*64*64 \
$GITHUB_WORKSPACE
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
libosmesa-dev \
libopenmpi-dev \
libsqlite3-dev \
libtbb-dev \
libwebsocketpp-dev \
graphviz \
python3-sklearn \
Expand Down
1 change: 1 addition & 0 deletions CMake/Print.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function(ttk_print_summary)
message(STATUS "TTK_ENABLE_SHARED_BASE_LIBRARIES: ${TTK_ENABLE_SHARED_BASE_LIBRARIES}")
message(STATUS "TTK_ENABLE_SPECTRA: ${TTK_ENABLE_SPECTRA}")
message(STATUS "TTK_ENABLE_SQLITE3: ${TTK_ENABLE_SQLITE3}")
message(STATUS "TTK_ENABLE_TBB: ${TTK_ENABLE_TBB}")
message(STATUS "TTK_ENABLE_TORCH: ${TTK_ENABLE_TORCH}")
message(STATUS "TTK_ENABLE_WEBSOCKETPP: ${TTK_ENABLE_WEBSOCKETPP}")
message(STATUS "TTK_ENABLE_ZFP: ${TTK_ENABLE_ZFP}")
Expand Down
15 changes: 12 additions & 3 deletions CMake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mark_as_advanced(TTK_IMPLICIT_PRECONDITIONS_THRESHOLD)
option(TTK_ENABLE_DOUBLE_TEMPLATING "Use double templating for bivariate data" OFF)
mark_as_advanced(TTK_ENABLE_DOUBLE_TEMPLATING)

option(TTK_REDUCE_TEMPLATE_INSTANTIATIONS "Use a reduced list of template instatiations to fasten build times" OFF)
option(TTK_REDUCE_TEMPLATE_INSTANTIATIONS "Use a reduced list of template instantiations to fasten build times" OFF)
mark_as_advanced(TTK_REDUCE_TEMPLATE_INSTANTIATIONS)

option(TTK_TIME_TARGETS "Print targets build time" OFF)
Expand Down Expand Up @@ -207,6 +207,15 @@ else()
message(STATUS "SQLite3 not found, disabling SQLite3 support in TTK.")
endif()

find_package(TBB QUIET)
if (TBB_FOUND)
option(TTK_ENABLE_TBB "Enable TBB support" ON)
message(STATUS "Found TBB ${TBB_VERSION} (${TBB_DIR})")
else()
option(TTK_ENABLE_TBB "Enable TBB support" OFF)
message(STATUS "TBB not found, disabling TBB support in TTK.")
endif()

find_package(ZFP QUIET)
if(ZFP_INCLUDE_DIRS)
option(TTK_ENABLE_ZFP "Enable ZFP support" ON)
Expand All @@ -223,8 +232,8 @@ if(NOT TTK_ENABLE_ZFP)
find_package(ZFP QUIET)
endif()

find_package(Eigen3 3.3 QUIET NO_MODULE)
if(EIGEN3_FOUND)
find_package(Eigen3 QUIET NO_MODULE)
if(Eigen3_FOUND)
option(TTK_ENABLE_EIGEN "Enable Eigen3 support" ON)
message(STATUS "Found Eigen ${Eigen3_VERSION} (${EIGEN3_INCLUDE_DIR})")

Expand Down
2 changes: 1 addition & 1 deletion CMake/cpack_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else()
set(CPACK_RESOURCE_FILE_README ${PROJECT_BINARY_DIR}/Readme.txt)
endif()
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"ttk-paraview (= 6.0.1), libboost-system-dev, libeigen3-dev, libgraphviz-dev, libsqlite3-dev, graphviz, python3-sklearn, zlib1g-dev, libqhull-dev, python3-dev, libgl1-mesa-dev")
"ttk-paraview (= 6.0.1), libboost-system-dev, libcgal-dev, libeigen3-dev, libgraphviz-dev, libsqlite3-dev, libtbb-dev, libwebsocketpp-dev, graphviz, python3-sklearn, zlib1g-dev, libqhull-dev, python3-dev, libgl1-mesa-dev")
# autogenerate dependency information
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# package will be installed under %ProgramFiles%\${CPACK_PACKAGE_INSTALL_DIRECTORY} on Windows
Expand Down
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Cycle-aware dimensionality reduction (TopoAE++, IEEE TVCG 2026)
- Distributed computation of persistent homology! (IEEE TPDS 2025)
- Discrete vector field topology! (IEEE VIS 2024)
- Fast DelaunayRips persistence computation for point cloud data
- New backend for TrackingFromFields (critical point based)
- Stochastic discrete gradient (IEEE VIS 2012)
- Fast planar Rips filtration persistence computation
Expand Down
10 changes: 9 additions & 1 deletion core/base/TTKBaseConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ if (@TTK_ENABLE_QHULL@ AND @Qhull_FOUND@)
find_dependency(Qhull REQUIRED)
endif()

if (@TTK_ENABLE_TBB@)
find_dependency(TBB REQUIRED)
endif()

if (@TTK_ENABLE_TORCH@)
set(Torch_DIR "@Torch_DIR@" CACHE PATH "Use TTK Torch dir" FORCE)
find_dependency(Torch REQUIRED @Torch_DIR@)
Expand All @@ -35,9 +39,13 @@ if (@TTK_ENABLE_SCIKIT_LEARN@ AND NOT @TTK_ENABLE_SHARED_BASE_LIBRARIES@)
find_package(Python3 COMPONENTS Development NumPy)
endif()

if (@TTK_ENABLE_CGAL@ AND @CGAL_FOUND@)
if (@TTK_ENABLE_CGAL@)
find_dependency(CGAL REQUIRED)
endif()

if (@TTK_ENABLE_EIGEN@)
find_dependency(Eigen3 CONFIG REQUIRED)
endif()

# Include the actual targets for TTK Base
include("${CMAKE_CURRENT_LIST_DIR}/TTKBaseTargets.cmake")
38 changes: 38 additions & 0 deletions core/base/delaunayRipsPersistenceDiagram/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ttk_add_base_library(delaunayRipsPersistenceDiagram
SOURCES
DelaunayRipsPersistenceDiagram.cpp
HEADERS
DelaunayRipsPersistenceDiagram.h
dset.h
geoPH3.h
geoPHd.h
geoPHUtils.h
DEPENDS
ripsPersistenceDiagram
)

set(TTK_DELAUNAY_MAX_COMPILED_DIMENSION "8" CACHE STRING "Maximum compiled dimension for arbitrary dimension Delaunay-related code")
mark_as_advanced(TTK_DELAUNAY_MAX_COMPILED_DIMENSION)
target_compile_definitions(delaunayRipsPersistenceDiagram PUBLIC TTK_DELAUNAY_MAX_COMPILED_DIMENSION=${TTK_DELAUNAY_MAX_COMPILED_DIMENSION})

target_link_libraries(delaunayRipsPersistenceDiagram PUBLIC Boost::boost)

if(TTK_ENABLE_EIGEN)
target_compile_definitions(delaunayRipsPersistenceDiagram PUBLIC TTK_ENABLE_EIGEN)
target_link_libraries(delaunayRipsPersistenceDiagram PUBLIC Eigen3::Eigen)
endif()

if(TTK_ENABLE_CGAL)
target_compile_definitions(delaunayRipsPersistenceDiagram PUBLIC TTK_ENABLE_CGAL)
if(CGAL_VERSION VERSION_LESS "6.0")
target_link_libraries(delaunayRipsPersistenceDiagram PUBLIC ${CGAL_LIBRARIES})
else()
target_link_libraries(delaunayRipsPersistenceDiagram PUBLIC CGAL::CGAL)
endif()
endif()

if(TTK_ENABLE_TBB)
target_compile_definitions(delaunayRipsPersistenceDiagram PUBLIC TTK_ENABLE_TBB)
target_compile_definitions(delaunayRipsPersistenceDiagram PUBLIC CGAL_LINKED_WITH_TBB)
target_link_libraries(delaunayRipsPersistenceDiagram PUBLIC TBB::tbb TBB::tbbmalloc)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#include <DelaunayRipsPersistenceDiagram.h>

using namespace ttk::rpd;

ttk::DelaunayRipsPersistenceDiagram::DelaunayRipsPersistenceDiagram() {
// inherited from Debug: prefix will be printed at the beginning of every msg
this->setDebugMsgPrefix("DelaunayRipsPD");
}

int ttk::DelaunayRipsPersistenceDiagram::execute(
const PointCloud &points, MultidimensionalDiagram &ph) const {

#ifdef TTK_ENABLE_CGAL
const unsigned dim = points[0].size();
if(points.size() <= dim) {
printErr("Not enough points");
return 1;
}
if(dim == 2) {
FastRipsPersistenceDiagram2 FRPD(points);
FRPD.setDebugLevel(debugLevel_);
FRPD.computeDelaunayRips0And1Persistence(ph);
} else if(dim == 3) {
#ifndef CGAL_LINKED_WITH_TBB
if(getThreadNumber() > 1) {
printWrn("TTK was not compiled with TBB:");
printWrn("sequential Delaunay triangulation only");
}
#endif
gph::runDelaunayRipsPersistenceDiagram3(points, ph, getThreadNumber());
ph[0].emplace_back(
FiltratedSimplex{{-1}, 0.}, FiltratedSimplex{{-1}, inf}); // infinite pair
} else {
if(dim > TTK_DELAUNAY_MAX_COMPILED_DIMENSION)
printWrn("High dimension: " + std::to_string(dim) + ">"
+ std::to_string(TTK_DELAUNAY_MAX_COMPILED_DIMENSION));
gph::tryDimensions(points, ph, getThreadNumber());
ph[0].emplace_back(
FiltratedSimplex{{-1}, 0.}, FiltratedSimplex{{-1}, inf}); // infinite pair
}
return 0;
#else
TTK_FORCE_USE(points);
TTK_FORCE_USE(ph);
printErr("TTK was not compiled with CGAL:");
printErr("this filter is not available.");
return 1;
#endif
}

int ttk::DelaunayRipsPersistenceDiagram::execute(
const PointCloud &points,
MultidimensionalDiagram &ph,
std::vector<Generator1> &generators1,
std::vector<Generator2> &generators2) const {

#ifdef TTK_ENABLE_CGAL
const unsigned dim = points[0].size();
if(dim > 3) {
printErr("Input dimension too large: " + std::to_string(dim) + ">3");
return 1;
}
if(points.size() <= dim) {
printErr("Not enough points");
return 1;
}
if(dim == 2) {
FastRipsPersistenceDiagram2 FRPD(points);
FRPD.setDebugLevel(debugLevel_);
FRPD.computeDelaunayRips0And1Persistence(ph);
FRPD.exportRips1Generators(generators1);
} else if(dim == 3) {
#ifndef CGAL_LINKED_WITH_TBB
if(getThreadNumber() > 1) {
printWrn("TTK was not compiled with TBB:");
printWrn("sequential Delaunay triangulation only");
}
#endif
gph::runDelaunayRipsPersistenceDiagram3(
points, ph, generators1, generators2, getThreadNumber());
ph[0].emplace_back(
FiltratedSimplex{{-1}, 0.}, FiltratedSimplex{{-1}, inf}); // infinite pair
}
return 0;
#else
TTK_FORCE_USE(points);
TTK_FORCE_USE(ph);
TTK_FORCE_USE(generators1);
TTK_FORCE_USE(generators2);
printErr("TTK was not compiled with CGAL:");
printErr("this filter is not available.");
return 1;
#endif
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/// \ingroup base
/// \class ttk::DelaunayRipsPersistenceDiagram
/// \author Mattéo Clémot <[email protected]>
/// \date July 2025.
///
/// \brief TTK base class that computes the persistence diagram of a
/// Delaunay-Rips filtration.
///
/// This module defines the %DelaunayRipsPersistenceDiagram class that takes a
/// point cloud and computes the persistence diagram of its Delaunay-Rips
/// filtration. It can also compute 1-dimensional and 2-dimensional persistence
/// generators for point clouds in R2 and R3.
///
/// \sa ttkDelaunayRipsPersistenceDiagram.cpp %for a usage example.
///
/// \b Online \b examples: \n
/// - <a
/// href="https://topology-tool-kit.github.io/examples/delaunayRispPersistence/">DelaunayRips
/// Persistence example</a> \n

#pragma once

// ttk common includes
#include <Debug.h>

#include <FastRipsPersistenceDiagram2.h>
#include <geoPH3.h>
#include <geoPHd.h>

namespace ttk {

/**
* The DelaunayRipsPersistenceDiagram class provides a method to call the
* relevant code in order to compute the persistence diagram of the Delaunay-
* Rips filtration of the input point cloud.
*/
class DelaunayRipsPersistenceDiagram : virtual public Debug {

public:
DelaunayRipsPersistenceDiagram();

/**
* @brief Main entry point (without generators)
*
* @param[in] points Input point cloud
* @param[out] ph Persistence diagram
*/
int execute(const rpd::PointCloud &points,
rpd::MultidimensionalDiagram &ph) const;

/**
* @brief Main entry point (with generators)
*
* @param[in] points Input point cloud
* @param[out] ph Persistence diagram
* @param[out] generators1 1-dimensional persistent generators
* @param[out] generators2 2-dimensional persistent generators
*/
int execute(const rpd::PointCloud &points,
rpd::MultidimensionalDiagram &ph,
std::vector<rpd::Generator1> &generators1,
std::vector<rpd::Generator2> &generators2) const;

}; // DelaunayRipsPersistenceDiagram class

} // namespace ttk
Loading
Loading