geoph 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ name: Wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build_sdist:
8
+ name: Build SDist
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ with:
13
+ submodules: true
14
+
15
+ - name: Build SDist
16
+ run: pipx run build --sdist
17
+
18
+ - name: Check metadata
19
+ run: pipx run twine check dist/*
20
+
21
+ - uses: actions/upload-artifact@v4
22
+ with:
23
+ name: dist-sdist
24
+ path: dist/*.tar.gz
25
+
26
+
27
+ build_wheels:
28
+ name: Wheels on ${{ matrix.os }}
29
+ runs-on: ${{ matrix.os }}
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ os: [ubuntu-latest, macos-latest, windows-2022]
34
+
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ with:
38
+ submodules: true
39
+
40
+ - name: Downloads (Windows)
41
+ if: startsWith(matrix.os, 'windows')
42
+ run: |
43
+ Invoke-WebRequest -Uri "https://archives.boost.io/release/1.89.0/source/boost_1_89_0.zip" -OutFile "boost.zip"
44
+ Expand-Archive -Path "boost.zip" -DestinationPath "."
45
+ Invoke-WebRequest -Uri "https://github.com/CGAL/cgal/releases/download/v6.0.2/CGAL-6.0.2-library.zip" -OutFile "CGAL.zip"
46
+ Expand-Archive -Path "CGAL.zip" -DestinationPath "."
47
+
48
+ - name: Build wheels
49
+ uses: pypa/cibuildwheel@v3.2
50
+
51
+ - name: Verify clean directory
52
+ run: git diff --exit-code
53
+ shell: bash
54
+
55
+ - name: Upload wheels
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ path: wheelhouse/*.whl
59
+ name: dist-${{ matrix.os }}
@@ -0,0 +1,103 @@
1
+ cmake_minimum_required(VERSION 3.15...3.27)
2
+ project(GeoPH LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 20)
5
+
6
+ if (NOT SKBUILD)
7
+ message(WARNING "\
8
+ This CMake file is meant to be executed using 'scikit-build-core'.
9
+ Running it directly will almost certainly not produce the desired
10
+ result. If you are a user trying to install this package, use the
11
+ command below, which will install all necessary build dependencies,
12
+ compile the package in an isolated environment, and then install it.
13
+ =====================================================================
14
+ $ pip install .")
15
+ endif()
16
+
17
+ if (CMAKE_VERSION VERSION_LESS 3.18)
18
+ set(DEV_MODULE Development)
19
+ else()
20
+ set(DEV_MODULE Development.Module)
21
+ endif()
22
+
23
+ find_package(Python 3.8
24
+ REQUIRED COMPONENTS Interpreter ${DEV_MODULE}
25
+ OPTIONAL_COMPONENTS Development.SABIModule)
26
+
27
+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
28
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
29
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
30
+ endif()
31
+
32
+ execute_process(
33
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
34
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
35
+ find_package(nanobind CONFIG REQUIRED)
36
+
37
+ nanobind_add_module(
38
+ # Name of the extension
39
+ geoph_impl
40
+
41
+ # Target the stable ABI for Python 3.12+, which reduces
42
+ # the number of binary wheels that must be built. This
43
+ # does nothing on older Python versions
44
+ STABLE_ABI
45
+
46
+ # Source code goes here
47
+ python/pyGeoPH.cpp
48
+ )
49
+
50
+ if (WIN32)
51
+ message("Windows: setting GMP/MPFR path")
52
+ set(GMP_INCLUDE_DIR "deps/auxiliary/gmp/include")
53
+ get_filename_component(GMP_LIBRARIES "deps/auxiliary/gmp/lib/libgmp-10.lib" ABSOLUTE)
54
+ set(MPFR_INCLUDE_DIR "deps/auxiliary/gmp/include")
55
+ get_filename_component(MPFR_LIBRARIES "deps/auxiliary/gmp/lib/libmpfr-4.lib" ABSOLUTE)
56
+
57
+ file(DOWNLOAD
58
+ "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz"
59
+ "${PROJECT_SOURCE_DIR}/deps/eigen-3.4.0.tar.gz"
60
+ EXPECTED_HASH SHA256=8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72)
61
+ file(ARCHIVE_EXTRACT
62
+ INPUT "${PROJECT_SOURCE_DIR}/deps/eigen-3.4.0.tar.gz"
63
+ DESTINATION "${PROJECT_SOURCE_DIR}/deps")
64
+ set(EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/deps/eigen-3.4.0")
65
+ include_directories(${EIGEN3_INCLUDE_DIR})
66
+ else()
67
+ find_package(Eigen3 REQUIRED NO_MODULE)
68
+ target_link_libraries (geoph_impl PUBLIC Eigen3::Eigen)
69
+ endif()
70
+
71
+ find_package(CGAL REQUIRED)
72
+ target_include_directories (geoph_impl PUBLIC ${CGAL_INCLUDE_DIR})
73
+ target_link_libraries (geoph_impl PUBLIC ${CGAL_LIBRARIES})
74
+
75
+ find_package(OpenMP)
76
+ if (OPENMP_FOUND)
77
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
78
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
79
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
80
+ add_compile_definitions(ENABLE_OPENMP)
81
+ endif()
82
+
83
+ find_package(TBB)
84
+ if (TBB_FOUND)
85
+ message("TBB FOUND")
86
+ target_link_libraries (geoph_impl PUBLIC TBB::tbb TBB::tbbmalloc)
87
+ add_compile_definitions(ENABLE_TBB)
88
+ add_compile_definitions(CGAL_LINKED_WITH_TBB)
89
+ add_compile_definitions(TBB_PREVIEW_GLOBAL_CONTROL)
90
+ endif()
91
+
92
+ if (SKBUILD)
93
+ install(TARGETS geoph_impl LIBRARY DESTINATION geoph)
94
+ endif()
95
+
96
+ #if (NOT SKBUILD)
97
+ # add_executable(test src/test.cpp)
98
+ # target_include_directories (test PUBLIC ${CGAL_INCLUDE_DIR})
99
+ # target_link_libraries (test PUBLIC ${CGAL_LIBRARIES})
100
+ # target_include_directories (test PUBLIC ${EIGEN3_INCLUDE_DIR})
101
+ # target_link_libraries (test PUBLIC ${EIGEN3_LIBRARIES})
102
+ # target_link_libraries (test PUBLIC TBB::tbb TBB::tbbmalloc)
103
+ #endif()
geoph-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.1
2
+ Name: geoph
3
+ Version: 0.0.1
4
+ Summary: A Delaunay-Rips persistent homology library
5
+ Project-URL: Homepage, https://github.com/MClemot/GeoPH
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+
9
+ # GeoPH: Delaunay–Rips persistence diagrams
10
+
11
+ This repository contains the code for the manuscript [*Delaunay–Rips filtration: a study and an algorithm*](https://arxiv.org/abs/2512.17382).
12
+
13
+ It also contains the code for the planar Rips and Delaunay--Rips persistence algorithm described in [*Topological Autoencoders++: Fast and Accurate Cycle-Aware Dimensionality Reduction*](https://arxiv.org/abs/2502.20215).
14
+
15
+ ## Dependencies
16
+
17
+ The following dependencies are required:
18
+ * Boost >= 1.72
19
+ * CGAL
20
+ * Eigen3
21
+
22
+ For multi-threading, the following dependencies are additionally required:
23
+ * Boost >= 1.83
24
+ * OpenMP
25
+ * TBB
26
+
27
+ This implementation also uses and contains the following codes:
28
+ * [ankerl::unordered_dense](https://github.com/martinus/unordered_dense), a densely stored hashmap and hashset by Martin Leitner-Ankerl
29
+ * [dset](https://github.com/wjakob/dset), a lock-free parallel disjoint set data structure by Wenzel Jakob
30
+
31
+ ## C++
32
+
33
+ This code can be used as a header-only C++ library. Copy and include the `geoPHUtils.h` and `geoPH{2,3,d}.h` files (in the `src` directory) in your project. Then use the classes `DRPersistence{2,3,D}`.
34
+
35
+ ## Python
36
+
37
+ Execute
38
+ `pip wheel .` in the project root
39
+ and
40
+ `pip install` the produced `.whl` wheel file.
geoph-0.0.1/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # GeoPH: Delaunay–Rips persistence diagrams
2
+
3
+ This repository contains the code for the manuscript [*Delaunay–Rips filtration: a study and an algorithm*](https://arxiv.org/abs/2512.17382).
4
+
5
+ It also contains the code for the planar Rips and Delaunay--Rips persistence algorithm described in [*Topological Autoencoders++: Fast and Accurate Cycle-Aware Dimensionality Reduction*](https://arxiv.org/abs/2502.20215).
6
+
7
+ ## Dependencies
8
+
9
+ The following dependencies are required:
10
+ * Boost >= 1.72
11
+ * CGAL
12
+ * Eigen3
13
+
14
+ For multi-threading, the following dependencies are additionally required:
15
+ * Boost >= 1.83
16
+ * OpenMP
17
+ * TBB
18
+
19
+ This implementation also uses and contains the following codes:
20
+ * [ankerl::unordered_dense](https://github.com/martinus/unordered_dense), a densely stored hashmap and hashset by Martin Leitner-Ankerl
21
+ * [dset](https://github.com/wjakob/dset), a lock-free parallel disjoint set data structure by Wenzel Jakob
22
+
23
+ ## C++
24
+
25
+ This code can be used as a header-only C++ library. Copy and include the `geoPHUtils.h` and `geoPH{2,3,d}.h` files (in the `src` directory) in your project. Then use the classes `DRPersistence{2,3,D}`.
26
+
27
+ ## Python
28
+
29
+ Execute
30
+ `pip wheel .` in the project root
31
+ and
32
+ `pip install` the produced `.whl` wheel file.
@@ -0,0 +1,3 @@
1
+ If the Windows installer is used, this directory will contain headers and
2
+ precompiled libraries of the GMP and MPFR libraries.
3
+