summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/pip-build-linux.yml18
-rw-r--r--.github/workflows/pip-build-osx.yml2
-rw-r--r--.github/workflows/pip-build-windows.yml2
-rw-r--r--.github/workflows/pip-packaging-linux.yml14
-rw-r--r--.github/workflows/pip-packaging-osx.yml2
-rw-r--r--.github/workflows/pip-packaging-windows.yml2
-rw-r--r--src/Tangential_complex/include/gudhi/Tangential_complex.h6
7 files changed, 33 insertions, 13 deletions
diff --git a/.github/workflows/pip-build-linux.yml b/.github/workflows/pip-build-linux.yml
index 11b6271d..bc4f999e 100644
--- a/.github/workflows/pip-build-linux.yml
+++ b/.github/workflows/pip-build-linux.yml
@@ -12,16 +12,16 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
- - name: Build wheel for Python 3.10
+ - name: Build wheel for Python 3.11
run: |
- mkdir build_310
- cd build_310
- cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON310/bin/python ..
+ mkdir build_311
+ cd build_311
+ cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python ..
cd src/python
- $PYTHON310/bin/python setup.py bdist_wheel
+ $PYTHON311/bin/python setup.py bdist_wheel
auditwheel repair dist/*.whl
- - name: Install and test wheel for Python 3.10
+ - name: Install and test wheel for Python 3.11
run: |
- $PYTHON310/bin/python -m pip install --user pytest build_310/src/python/dist/*.whl
- $PYTHON310/bin/python -c "import gudhi; print(gudhi.__version__)"
- $PYTHON310/bin/python -m pytest src/python/test/test_alpha_complex.py
+ $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/dist/*.whl
+ $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)"
+ $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py
diff --git a/.github/workflows/pip-build-osx.yml b/.github/workflows/pip-build-osx.yml
index dbd15e2c..a438124a 100644
--- a/.github/workflows/pip-build-osx.yml
+++ b/.github/workflows/pip-build-osx.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.10']
+ python-version: ['3.11']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pip-build-windows.yml b/.github/workflows/pip-build-windows.yml
index b3d75706..50bdfe2c 100644
--- a/.github/workflows/pip-build-windows.yml
+++ b/.github/workflows/pip-build-windows.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.10']
+ python-version: ['3.11']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml
index 285cfa00..14b1cf7a 100644
--- a/.github/workflows/pip-packaging-linux.yml
+++ b/.github/workflows/pip-packaging-linux.yml
@@ -79,6 +79,19 @@ jobs:
$PYTHON310/bin/python -m pip install --user pytest build_310/src/python/dist/*.whl
$PYTHON310/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON310/bin/python -m pytest src/python/test/test_alpha_complex.py
+ - name: Build wheel for Python 3.11
+ run: |
+ mkdir build_311
+ cd build_311
+ cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python ..
+ cd src/python
+ $PYTHON311/bin/python setup.py bdist_wheel
+ auditwheel repair dist/*.whl
+ - name: Install and test wheel for Python 3.11
+ run: |
+ $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/dist/*.whl
+ $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)"
+ $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py
- name: Publish on PyPi
env:
TWINE_USERNAME: __token__
@@ -89,3 +102,4 @@ jobs:
$PYTHON36/bin/python -m twine upload build_38/src/python/wheelhouse/*
$PYTHON36/bin/python -m twine upload build_39/src/python/wheelhouse/*
$PYTHON36/bin/python -m twine upload build_310/src/python/wheelhouse/*
+ $PYTHON36/bin/python -m twine upload build_311/src/python/wheelhouse/*
diff --git a/.github/workflows/pip-packaging-osx.yml b/.github/workflows/pip-packaging-osx.yml
index 851949fc..9ddbcfce 100644
--- a/.github/workflows/pip-packaging-osx.yml
+++ b/.github/workflows/pip-packaging-osx.yml
@@ -15,7 +15,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.7', '3.8', '3.9', '3.10']
+ python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml
index 6f544499..df0db9a5 100644
--- a/.github/workflows/pip-packaging-windows.yml
+++ b/.github/workflows/pip-packaging-windows.yml
@@ -10,7 +10,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: ['3.7', '3.8', '3.9', '3.10']
+ python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: Build wheels for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h
index b448db2d..ab203ca5 100644
--- a/src/Tangential_complex/include/gudhi/Tangential_complex.h
+++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h
@@ -56,6 +56,7 @@
#include <string>
#include <cstddef> // for std::size_t
#include <optional>
+#include <numeric> // for std::iota
#ifdef GUDHI_USE_TBB
#include <tbb/parallel_for.h>
@@ -624,6 +625,11 @@ class Tangential_complex {
int max_dim = -1;
+ // Ordered vertices to be inserted first by the create_complex method to avoid quadratic complexity.
+ std::vector<typename Simplex_tree_::Vertex_handle> vertices(m_points.size());
+ std::iota(vertices.begin(), vertices.end(), 0);
+ tree.insert_batch_vertices(vertices);
+
// For each triangulation
for (std::size_t idx = 0; idx < m_points.size(); ++idx) {
// For each cell of the star