Skip to content

Commit

Permalink
Merge branch 'GUDHI:master' into const_simplex_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
hschreiber authored Aug 12, 2024
2 parents 5ac7d58 + f23c154 commit f5f9922
Show file tree
Hide file tree
Showing 67 changed files with 1,289 additions and 1,178 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
python:
docker:
- image: gudhi/ci_for_gudhi:2024.06.02
resource_class: large # Delaunay complex requires about 5 Gb of RAM to compile
steps:
- checkout
- run:
Expand Down
8 changes: 7 additions & 1 deletion .github/next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ We are now using GitHub to develop the GUDHI library, do not hesitate to [fork t

Below is a list of changes:

- [Delaunay complex](https://gudhi.inria.fr/python/latest/delaunay_complex_user.html)
- The Delaunay complex can be equipped with different filtrations:
* Delaunay complex (no filtration values computed)
* Delaunay Čech complex (using minimal enclosing ball)
* Alpha complex (moved in this new section)

- [Module](link)
- **...**

Expand All @@ -29,4 +35,4 @@ For further information about downloading and installing the library ([C++](http
## Contributors

- **...**
- **...**
- **...**
1 change: 1 addition & 0 deletions .github/workflows/pip-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
$PYTHON39/bin/python -m pip install numpy~=1.19.3
$PYTHON39/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON39/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pip-build-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
python -m pip install --user pytest build/src/python/dist/*.whl
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v src/python/test/test_alpha_complex.py
python -m pytest -v src/python/test/test_delaunay_complex.py
python -m pytest -v src/python/test/test_bottleneck_distance.py
python -m pytest -v src/python/test/test_cubical_complex.py
python -m pytest -v src/python/test/test_rips_complex.py
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pip-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
python -m pip install --user pytest
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v ".\src\python\test\test_alpha_complex.py"
python -m pytest -v ".\src\python\test\test_delaunay_complex.py"
python -m pytest -v ".\src\python\test\test_bottleneck_distance.py"
python -m pytest -v ".\src\python\test\test_cubical_complex.py"
python -m pytest -v ".\src\python\test\test_rips_complex.py"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pip-packaging-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
$PYTHON38/bin/python -m pip install numpy --upgrade
$PYTHON38/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON38/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON38/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON38/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON38/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON38/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand All @@ -54,6 +55,7 @@ jobs:
$PYTHON39/bin/python -m pip install numpy~=1.19.3
$PYTHON39/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON39/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON39/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand All @@ -72,6 +74,7 @@ jobs:
$PYTHON310/bin/python -m pip install numpy~=1.21.6
$PYTHON310/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON310/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON310/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON310/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON310/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON310/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand All @@ -90,6 +93,7 @@ jobs:
$PYTHON311/bin/python -m pip install numpy~=1.23.2
$PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON311/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON311/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON311/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON311/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON311/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand All @@ -108,6 +112,7 @@ jobs:
$PYTHON312/bin/python -m pip install numpy~=1.26.0
$PYTHON312/bin/python -c "import gudhi; print(gudhi.__version__)"
$PYTHON312/bin/python -m pytest -v src/python/test/test_alpha_complex.py
$PYTHON312/bin/python -m pytest -v src/python/test/test_delaunay_complex.py
$PYTHON312/bin/python -m pytest -v src/python/test/test_bottleneck_distance.py
$PYTHON312/bin/python -m pytest -v src/python/test/test_cubical_complex.py
$PYTHON312/bin/python -m pytest -v src/python/test/test_rips_complex.py
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pip-packaging-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
python -m pip install --user pytest build/src/python/dist/*.whl
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v src/python/test/test_alpha_complex.py
python -m pytest -v src/python/test/test_delaunay_complex.py
python -m pytest -v src/python/test/test_bottleneck_distance.py
python -m pytest -v src/python/test/test_cubical_complex.py
python -m pytest -v src/python/test/test_rips_complex.py
Expand Down Expand Up @@ -121,6 +122,7 @@ jobs:
python -m pip install --user pytest build/src/python/dist/*.whl
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v src/python/test/test_alpha_complex.py
python -m pytest -v src/python/test/test_delaunay_complex.py
python -m pytest -v src/python/test/test_bottleneck_distance.py
python -m pytest -v src/python/test/test_cubical_complex.py
python -m pytest -v src/python/test/test_rips_complex.py
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pip-packaging-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
python -m pip install --user pytest
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v ".\src\python\test\test_alpha_complex.py"
python -m pytest -v ".\src\python\test\test_delaunay_complex.py"
python -m pytest -v ".\src\python\test\test_bottleneck_distance.py"
python -m pytest -v ".\src\python\test\test_cubical_complex.py"
python -m pytest -v ".\src\python\test\test_rips_complex.py"
Expand Down Expand Up @@ -117,6 +118,7 @@ jobs:
python -m pip install --user pytest
python -c "import gudhi; print(gudhi.__version__)"
python -m pytest -v ".\src\python\test\test_alpha_complex.py"
python -m pytest -v ".\src\python\test\test_delaunay_complex.py"
python -m pytest -v ".\src\python\test\test_bottleneck_distance.py"
python -m pytest -v ".\src\python\test\test_cubical_complex.py"
python -m pytest -v ".\src\python\test\test_rips_complex.py"
Expand Down
7 changes: 3 additions & 4 deletions src/Alpha_complex/include/gudhi/Alpha_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
// to construct Alpha_complex from a OFF file of points
#include <gudhi/Points_off_io.h>

#include <cmath> // isnan, fmax
#include <memory> // for std::unique_ptr
#include <cstddef> // for std::size_t

#include <CGAL/Delaunay_triangulation.h>
#include <CGAL/Regular_triangulation.h> // aka. Weighted Delaunay triangulation
#include <CGAL/Epeck_d.h> // For EXACT or SAFE version
Expand All @@ -46,6 +42,9 @@
#include <numeric> // for std::iota
#include <algorithm> // for std::sort
#include <type_traits> // for std::is_same_v
#include <cmath> // isnan, fmax
#include <memory> // for std::unique_ptr
#include <cstddef> // for std::size_t

// Make compilation fail - required for external projects - https://github.com/GUDHI/gudhi-devel/issues/10
#if CGAL_VERSION_NR < 1041101000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Alpha_kernel_d<Kernel, false> {
private:
// Kernel for functions access.
Kernel kernel_;

public:
// Fake type for compilation to succeed (cf. std::conditional in Alpha_complex.h)
using Weighted_point_d = void;
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence_matrix/doc/Intro_persistence_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ namespace persistence_matrix {
* \subsection matrixexamples Examples
*
* Here is a list of examples using the module:
* \li \gudhi_example_link{Persistence_matrix,representative_cycles_from_matrix.cpp} - A simple example on how to
* \li \gudhi_example_link{Persistence_matrix,example_representative_cycles_from_matrix.cpp} - A simple example on how to
* use the matrix to compute representative cycles.
*
* \li \gudhi_example_link{Persistence_matrix,simplex_tree_to_matrix.cpp} - A simplex example on how to build
* \li \gudhi_example_link{Persistence_matrix,example_simplex_tree_to_matrix.cpp} - A simplex example on how to build
* a the different matrices from a simplex tree.
*
* @}
Expand Down
12 changes: 6 additions & 6 deletions src/Persistence_matrix/example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
add_executable_with_targets(Matrix_examples_representative_cycles representative_cycles_from_matrix.cpp TBB::tbb)
add_test(NAME Matrix_examples_representative_cycles COMMAND $<TARGET_FILE:Matrix_examples_representative_cycles>)
add_executable_with_targets(Persistence_matrix_example_representative_cycles_from_matrix example_representative_cycles_from_matrix.cpp TBB::tbb)
add_test(NAME Persistence_matrix_example_representative_cycles_from_matrix COMMAND $<TARGET_FILE:Persistence_matrix_example_representative_cycles_from_matrix>)

add_executable_with_targets(Matrix_examples_simplex_tree_matrix simplex_tree_to_matrix.cpp TBB::tbb)
add_test(NAME Matrix_examples_simplex_tree_matrix COMMAND $<TARGET_FILE:Matrix_examples_simplex_tree_matrix>)
add_executable_with_targets(Persistence_matrix_example_simplex_tree_to_matrix example_simplex_tree_to_matrix.cpp TBB::tbb)
add_test(NAME Persistence_matrix_example_simplex_tree_to_matrix COMMAND $<TARGET_FILE:Persistence_matrix_example_simplex_tree_to_matrix>)

add_executable_with_targets(Matrix_examples_field_operations example_field_operations.cpp TBB::tbb)
add_test(NAME Matrix_examples_field_operations COMMAND $<TARGET_FILE:Matrix_examples_field_operations>)
add_executable_with_targets(Persistence_matrix_example_field_operations example_field_operations.cpp TBB::tbb)
add_test(NAME Persistence_matrix_example_field_operations COMMAND $<TARGET_FILE:Persistence_matrix_example_field_operations>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <iostream>

#include <gudhi/matrix.h>
#include <gudhi/Matrix.h>
#include <gudhi/persistence_matrix_options.h>

using Gudhi::persistence_matrix::Default_options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <vector>

#include <gudhi/matrix.h>
#include <gudhi/Matrix.h>
#include <gudhi/persistence_matrix_options.h>
#include <gudhi/Simplex_tree.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - YYYY/MM Author: Description of the modification
*/

/** @file matrix.h
/** @file Matrix.h
* @author Hannah Schreiber
* @brief Contains @ref Gudhi::persistence_matrix::Matrix class.
*/
Expand All @@ -31,8 +31,8 @@

#include <gudhi/Fields/Z2_field_operators.h>

#include <gudhi/Persistence_matrix/overlay_ididx_to_matidx.h>
#include <gudhi/Persistence_matrix/overlay_posidx_to_matidx.h>
#include <gudhi/Persistence_matrix/Id_to_index_overlay.h>
#include <gudhi/Persistence_matrix/Position_to_index_overlay.h>

#include <gudhi/Persistence_matrix/matrix_dimension_holders.h>
#include <gudhi/Persistence_matrix/matrix_row_access.h>
Expand All @@ -45,11 +45,11 @@
#include <gudhi/Persistence_matrix/chain_vine_swap.h>
#include <gudhi/Persistence_matrix/chain_rep_cycles.h>

#include <gudhi/Persistence_matrix/base_matrix.h>
#include <gudhi/Persistence_matrix/base_matrix_with_column_compression.h>
#include <gudhi/Persistence_matrix/boundary_matrix.h>
#include <gudhi/Persistence_matrix/ru_matrix.h>
#include <gudhi/Persistence_matrix/chain_matrix.h>
#include <gudhi/Persistence_matrix/Base_matrix.h>
#include <gudhi/Persistence_matrix/Base_matrix_with_column_compression.h>
#include <gudhi/Persistence_matrix/Boundary_matrix.h>
#include <gudhi/Persistence_matrix/RU_matrix.h>
#include <gudhi/Persistence_matrix/Chain_matrix.h>

#include <gudhi/Persistence_matrix/allocators/cell_constructors.h>
#include <gudhi/Persistence_matrix/columns/cell_types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file base_matrix.h
* @file Base_matrix.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Base_matrix class.
*/
Expand All @@ -25,7 +25,7 @@ namespace Gudhi {
namespace persistence_matrix {

/**
* @class Base_matrix base_matrix.h gudhi/Persistence_matrix/base_matrix.h
* @class Base_matrix Base_matrix.h gudhi/Persistence_matrix/Base_matrix.h
* @ingroup persistence_matrix
*
* @brief A @ref basematrix "basic matrix" structure allowing to easily manipulate and access entire columns and rows,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file base_matrix_with_column_compression.h
* @file Base_matrix_with_column_compression.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Base_matrix_with_column_compression class.
*/
Expand All @@ -30,8 +30,8 @@ namespace Gudhi {
namespace persistence_matrix {

/**
* @class Base_matrix_with_column_compression base_matrix_with_column_compression.h \
* gudhi/Persistence_matrix/base_matrix_with_column_compression.h
* @class Base_matrix_with_column_compression Base_matrix_with_column_compression.h \
* gudhi/Persistence_matrix/Base_matrix_with_column_compression.h
* @ingroup persistence_matrix
*
* @brief A @ref basematrix "base matrix" (also see @ref Base_matrix), but with column compression. That is, all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file boundary_matrix.h
* @file Boundary_matrix.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Boundary_matrix class.
*/
Expand All @@ -25,9 +25,9 @@
namespace Gudhi {
namespace persistence_matrix {

// TODO: factorize/inherit/compose with base matrix?
// TODO: factorize/inherit/compose with Base_matrix?
/**
* @class Boundary_matrix boundary_matrix.h gudhi/Persistence_matrix/boundary_matrix.h
* @class Boundary_matrix Boundary_matrix.h gudhi/Persistence_matrix/Boundary_matrix.h
* @ingroup persistence_matrix
*
* @brief %Matrix structure to store the ordered @ref boundarymatrix "boundary matrix" \f$ R \f$ of a filtered complex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file chain_matrix.h
* @file Chain_matrix.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Chain_matrix class.
*/
Expand All @@ -25,13 +25,13 @@
#include <utility> //std::swap, std::move & std::exchange
#include <algorithm> //std::sort

#include <gudhi/Persistence_matrix/overlay_ididx_to_matidx.h> //friend
#include <gudhi/Persistence_matrix/Id_to_index_overlay.h> //friend

namespace Gudhi {
namespace persistence_matrix {

/**
* @class Chain_matrix chain_matrix.h gudhi/Persistence_matrix/chain_matrix.h
* @class Chain_matrix Chain_matrix.h gudhi/Persistence_matrix/Chain_matrix.h
* @ingroup persistence_matrix
*
* @brief %Matrix structure storing a compatible base of a filtered chain complex. See @cite zigzag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file overlay_ididx_to_matidx.h
* @file Id_to_index_overlay.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Id_to_index_overlay class.
*/
Expand All @@ -28,7 +28,7 @@ namespace Gudhi {
namespace persistence_matrix {

/**
* @class Id_to_index_overlay overlay_ididx_to_matidx.h gudhi/Persistence_matrix/overlay_ididx_to_matidx.h
* @class Id_to_index_overlay Id_to_index_overlay.h gudhi/Persistence_matrix/Id_to_index_overlay.h
* @ingroup persistence_matrix
*
* @brief Overlay for @ref mp_matrices "non-basic matrices" replacing all input and output @ref MatIdx indices of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file overlay_posidx_to_matidx.h
* @file Position_to_index_overlay.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::Position_to_index_overlay class.
*/
Expand All @@ -25,7 +25,7 @@ namespace Gudhi {
namespace persistence_matrix {

/**
* @class Position_to_index_overlay overlay_posidx_to_matidx.h gudhi/Persistence_matrix/overlay_posidx_to_matidx.h
* @class Position_to_index_overlay Position_to_index_overlay.h gudhi/Persistence_matrix/Position_to_index_overlay.h
* @ingroup persistence_matrix
*
* @brief Overlay for @ref chainmatrix "chain matrices" replacing all input and output @ref MatIdx indices of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

/**
* @file ru_matrix.h
* @file RU_matrix.h
* @author Hannah Schreiber
* @brief Contains the @ref Gudhi::persistence_matrix::RU_matrix class.
*/
Expand All @@ -25,7 +25,7 @@ namespace Gudhi {
namespace persistence_matrix {

/**
* @class RU_matrix ru_matrix.h gudhi/Persistence_matrix/ru_matrix.h
* @class RU_matrix RU_matrix.h gudhi/Persistence_matrix/RU_matrix.h
* @ingroup persistence_matrix
*
* @brief %Matrix structure to store the ordered @ref boundarymatrix "boundary matrix" \f$ R \cdot U \f$ of a filtered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace persistence_matrix {
*
* @brief List of column types.
*/
enum Column_types {
enum class Column_types {
LIST, /**< @ref List_column "": Underlying container is a std::list<@ref Cell*>. */
SET, /**< @ref Set_column "": Underlying container is a std::set<@ref Cell*>. */
HEAP, /**< @ref Heap_column "": Underlying container is a std::vector<@ref Cell*> ordered as a heap.
Expand All @@ -46,7 +46,7 @@ enum Column_types {
* @brief List if indexation schemes. See @ref mp_indexation "description of indexation schemes" for more details
* about the meaning of the indexation types.
*/
enum Column_indexation_types {
enum class Column_indexation_types {
CONTAINER, /**< Default use of @ref MatIdx indices. */
POSITION, /**< All input and output @ref MatIdx indices are replaced with @ref PosIdx indices. */
IDENTIFIER /**< All input and output @ref MatIdx indices are replaced with @ref IDIdx indices. */
Expand Down
Loading

0 comments on commit f5f9922

Please sign in to comment.