Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
fbe280b
HDVF (split HDVF_core/HDVF)
umenohana13 May 1, 2025
81439d3
HDVF rework
umenohana13 May 1, 2025
01dcca5
Changed Hdvf class names + namespace
umenohana13 May 1, 2025
85b0334
HDVF concept, HDVF classes
umenohana13 May 5, 2025
cb2d600
HDVF review
umenohana13 May 7, 2025
d696cf2
Hdvf
umenohana13 May 7, 2025
fde3905
Hdvf_persistence, Filtration
umenohana13 May 14, 2025
3ea95fc
Sub_chain_complex_mask
umenohana13 May 19, 2025
184305f
Concept SparseMatrix
umenohana13 May 20, 2025
c1363e1
Sparse_matrix
umenohana13 May 21, 2025
40c2864
Sparse_chain
umenohana13 May 27, 2025
c58e7a5
Sparse_chain, Sparse_matrix
umenohana13 May 27, 2025
720f5f6
Sub_sparse_matrix
umenohana13 May 28, 2025
d8e7b0b
Hdvf_duality
umenohana13 May 29, 2025
10a4322
Hdvf_persistence
umenohana13 May 30, 2025
c6dd6b0
First "full" commit
umenohana13 May 30, 2025
fe1bcd7
HDVF in progress
umenohana13 Jun 6, 2025
6f22d60
HDVF and classes rework
umenohana13 Jun 7, 2025
e807247
Hdvf_persistence
umenohana13 Jun 7, 2025
b5d87ba
HDVF
umenohana13 Jun 9, 2025
e974c23
Hdvf, Hdvf_core (correction type des indices)
umenohana13 Jun 12, 2025
609334f
All HDVFs + Abstract_simplicial_complex + tools_io
umenohana13 Jun 13, 2025
3fab408
Cubical_chain_complex and tools (int->size_t corrected)
umenohana13 Jun 13, 2025
79ffb5d
Chain complex concepts corrected
umenohana13 Jun 13, 2025
57528d2
Full revision OK
umenohana13 Jun 14, 2025
8bb8ef8
Revised vtk output
umenohana13 Jun 17, 2025
b10bf6d
References update
umenohana13 Jun 20, 2025
9fbdd4f
User manual ongoing
umenohana13 Jul 13, 2025
9b3b8c5
User manual ongoing
umenohana13 Jul 14, 2025
cf20df6
User doc + before bug correction
umenohana13 Jul 16, 2025
ffe9ff0
Bug on find_pair_M family + user doc
umenohana13 Jul 17, 2025
4a80b5f
User manual
umenohana13 Jul 18, 2025
9115ab5
User manuel, Sparse_matrix bug corrected
umenohana13 Jul 23, 2025
6621100
Preliminary user manual, preliminary release of the code
umenohana13 Jul 25, 2025
01a5b04
User + ref manuals
umenohana13 Jul 28, 2025
b5c05ac
Fixes
umenohana13 Jul 31, 2025
ab814ec
deal with pkg-small.png
afabri Aug 1, 2025
0c2a8ce
fixes for /build
afabri Aug 1, 2025
624012f
fixes for /build
afabri Aug 1, 2025
05de5d4
trailing whitespace
afabri Aug 1, 2025
89d39c9
fix namespaces
afabri Aug 1, 2025
6470aab
fix namespaces
afabri Aug 1, 2025
86ae7d1
fix namespaces
afabri Aug 1, 2025
dc32293
namespaces
afabri Aug 1, 2025
678fd1b
Fix
umenohana13 Aug 1, 2025
da1f0b4
Fixes
umenohana13 Aug 2, 2025
39cf002
Tests
umenohana13 Aug 3, 2025
85506a8
typos
afabri Aug 4, 2025
23e29f5
Add license check
afabri Aug 4, 2025
f0974f5
Add CMakeLists.txt
afabri Aug 4, 2025
50a04c7
more license checks and typos
afabri Aug 4, 2025
a3f0c2b
more license checks
afabri Aug 4, 2025
e1c2f57
untabify
afabri Aug 4, 2025
923229e
trailing whitespace
afabri Aug 4, 2025
241a7da
Add license header
afabri Aug 4, 2025
ed712ca
The beginning of fixes to make for the CI, and not only
afabri Aug 4, 2025
45ddce6
Fixes
umenohana13 Aug 5, 2025
2d20ef4
Review AbstractChainComplex + Filtration
umenohana13 Aug 6, 2025
51575f9
GeometricChainComplex and HDVF OK
umenohana13 Aug 7, 2025
b4465d1
Fixes of 1st round
umenohana13 Aug 7, 2025
8239467
Fixes
umenohana13 Aug 8, 2025
bb36619
Update HDVF/doc/HDVF/Concepts/AbstractChainComplex.h
afabri Aug 8, 2025
27a3cae
Fixes
umenohana13 Aug 11, 2025
2df3adf
Apply suggestions from code review
umenohana13 Aug 11, 2025
6d82cce
Fixed "using namespace std"
umenohana13 Aug 11, 2025
a8d7751
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Aug 11, 2025
4e68cc6
Tests - fixes
umenohana13 Aug 11, 2025
d417033
Test (test_sparse_matrices)
umenohana13 Aug 12, 2025
e741f9b
Update HDVF/doc/HDVF/Concepts/HDVF.h
afabri Aug 12, 2025
5559fd5
For VC++: Replace not; Add typename; move abs() out of Z2
afabri Aug 13, 2025
f17503e
Fixe + example persistance
umenohana13 Aug 14, 2025
7f3852a
Fixes
umenohana13 Aug 15, 2025
f22e2d8
Fixes + test_mesh_object_io
umenohana13 Aug 15, 2025
3dc5228
Documentation
umenohana13 Aug 15, 2025
627dab9
fix friend in Sparse_matrix
afabri Aug 15, 2025
62de90d
Fix
umenohana13 Aug 15, 2025
abff582
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Aug 15, 2025
7ccfddb
Fixes
umenohana13 Aug 15, 2025
2c150e7
Test Abstract_simplicial_chain_complex
umenohana13 Aug 15, 2025
b338fc4
ws
afabri Aug 18, 2025
1b3718c
Fixes
umenohana13 Aug 20, 2025
fe77eb4
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Aug 20, 2025
70af234
Update HDVF/include/CGAL/HDVF/Geometric_chain_complex_tools.h
afabri Aug 21, 2025
fdaa3ba
Fixes
umenohana13 Aug 21, 2025
31c65d7
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Aug 21, 2025
1356634
Fixes
umenohana13 Aug 21, 2025
27c2264
Rework of Hdvf_persistence types
umenohana13 Aug 21, 2025
a27adf5
Hdvf_persistence rework
umenohana13 Aug 21, 2025
6835047
For Andreas (problem with << overload)
umenohana13 Aug 21, 2025
32a027f
Fixes
umenohana13 Aug 22, 2025
4bb875b
Update HDVF/include/CGAL/HDVF/Hdvf.h
afabri Aug 25, 2025
8d8ec9e
Fixes
umenohana13 Aug 25, 2025
6af932f
Fixes
umenohana13 Aug 26, 2025
24d143a
Cubical_chain_complex fixes
umenohana13 Aug 26, 2025
561d873
Fix
umenohana13 Aug 26, 2025
d23c1cb
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
afabri Aug 29, 2025
92434ec
Friends rework
umenohana13 Aug 31, 2025
f751d06
Friends rework
umenohana13 Sep 1, 2025
17f8a5b
Friends rework + fixes
umenohana13 Sep 1, 2025
5f47e36
Inline fixes
umenohana13 Sep 1, 2025
db7ec4e
Fixes
umenohana13 Sep 3, 2025
cdae059
Surface_mesh_io
umenohana13 Sep 4, 2025
dda2b8f
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
afabri Sep 4, 2025
b529ae1
Fixes
umenohana13 Sep 17, 2025
6f0a8c8
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Sep 17, 2025
0dd833f
Fix
umenohana13 Sep 17, 2025
6632f62
indexes -> indices
afabri Sep 18, 2025
d49fbb8
indexes -> indices
afabri Sep 18, 2025
56b31fc
friend -> relates
afabri Sep 18, 2025
b63e415
typos
afabri Sep 18, 2025
8f27737
Remove \defgroup ChainChainComparison Compares two chains.
afabri Sep 18, 2025
47d4139
fix \relates
afabri Sep 18, 2025
7147f3c
\relates must be outside of the class
afabri Sep 18, 2025
b5b73ac
\relates must be outside of the class
afabri Sep 18, 2025
f7dc05f
\relates must be outside of the class
afabri Sep 18, 2025
b592327
Fixes
umenohana13 Sep 18, 2025
a1f6eb9
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Sep 18, 2025
fc79996
Update AbstractChainComplex.h
umenohana13 Sep 18, 2025
947a7c5
Fix
umenohana13 Sep 18, 2025
2816a4b
Add Algebraic_structure_traits<Z2>
afabri Sep 18, 2025
11a6260
vertices coordinates -> vertex coordinates
afabri Sep 18, 2025
8c9636e
Add missing '}'
afabri Sep 18, 2025
6234a4f
Add Real_embeddable_traits
afabri Sep 18, 2025
9a885d9
Add AST::Is_square
afabri Sep 18, 2025
4fb239f
It may be Uncertain<Comparison_result>
afabri Sep 18, 2025
bb5dedb
Update HDVF/doc/HDVF/Concepts/SparseChain.h
umenohana13 Sep 18, 2025
1999c63
Fixes
umenohana13 Sep 18, 2025
309185e
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Sep 18, 2025
bfa35d7
Fixes
umenohana13 Sep 24, 2025
28b130a
Add two specializations of Algebraic_structure_traits for prime and n…
afabri Sep 25, 2025
f31b0bb
typos
afabri Sep 26, 2025
c639053
Fixes
umenohana13 Sep 27, 2025
da87747
Update Zp.h
umenohana13 Sep 27, 2025
c8f1f87
typos
afabri Oct 2, 2025
0c1b1a8
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
umenohana13 Oct 9, 2025
691eb09
Fix
umenohana13 Oct 9, 2025
0b81d47
Fix
umenohana13 Oct 9, 2025
f355ac8
Introduce geometric traits class
afabri Oct 13, 2025
6d6bb3c
Added license header
afabri Oct 13, 2025
538a3b3
Add tparam
afabri Oct 13, 2025
de3251f
Deal with 2D output
afabri Oct 13, 2025
712a704
Add example for Surface_mesh
afabri Oct 13, 2025
82b06be
Add example for Surface_mesh
afabri Oct 13, 2025
e8b4256
Drop prefix example_ from example file names
afabri Oct 13, 2025
9678f5c
cleanup
afabri Oct 13, 2025
7e01d99
Start fixing test
afabri Oct 13, 2025
d091029
Zp
umenohana13 Oct 14, 2025
67acf84
replace vertex_coords() with point()
afabri Oct 14, 2025
db13f2f
insert -> write
afabri Oct 14, 2025
f838e8f
insert -> write
afabri Oct 14, 2025
4f2423f
Fixes
umenohana13 Oct 15, 2025
737b713
Fixes
umenohana13 Oct 15, 2025
8f2b1d6
I suggest that we always return const& which corresponds to keeping c…
afabri Oct 15, 2025
c5a53cb
Test for Zp
umenohana13 Oct 15, 2025
df624c1
Fixes
umenohana13 Oct 16, 2025
3e116b5
Fixes
umenohana13 Oct 16, 2025
da994a9
Add Hdvf_traits_d.h
afabri Oct 16, 2025
f7c594c
Merge cgal/main
afabri Oct 16, 2025
9afad6a
Fixes
umenohana13 Oct 17, 2025
fdcc65d
Test Hdvf_core
umenohana13 Oct 18, 2025
a611a2a
Fixes
umenohana13 Oct 18, 2025
5b46717
If to_point() is in the traits you can call Traits().to_point(vec)
afabri Oct 19, 2025
0603975
Fix (points / cubical chain complex)
umenohana13 Oct 20, 2025
a8583f3
Traits in various dimensions
umenohana13 Oct 20, 2025
419b57f
Moved read_nodes
umenohana13 Oct 20, 2025
7ce943c
Test Hdvf_traits_d <4>
umenohana13 Oct 21, 2025
5e5070e
dD needs Eigen, other fixes to make hdvf_simplicial_4.cpp compile
afabri Oct 21, 2025
6b0f3b7
4D simplicial OK
umenohana13 Oct 22, 2025
1c27308
Fix
umenohana13 Oct 22, 2025
1cc4794
Add <Traits> so that examples compile
afabri Oct 23, 2025
9ac1533
Some fixes for VC++
afabri Oct 23, 2025
8a2f5fe
dD export improvement
umenohana13 Oct 23, 2025
2e60ff0
HDVF duality
umenohana13 Oct 24, 2025
6650921
Use Epick_d functors
afabri Oct 24, 2025
fbd399a
doc bug
afabri Oct 27, 2025
cb07f99
doc bug
afabri Oct 27, 2025
4f0d5eb
At some place it needs the concept and not the class name. But needs…
afabri Oct 27, 2025
f3e013e
Move doc of Cell, so that Filtration_core doc shows up; boolean -> B…
afabri Oct 27, 2025
f9a75e6
replace concept with local typedef
afabri Oct 27, 2025
fc2b4ff
Add a typedef
afabri Oct 27, 2025
869bbf5
cleanup
afabri Oct 31, 2025
29e7388
cleanup
afabri Oct 31, 2025
3c3a706
cleanup
afabri Oct 31, 2025
f0df21e
In the documentation of the concept we cannot put a model
afabri Nov 3, 2025
cb674af
In the documentation of the concept we cannot put a model
afabri Nov 3, 2025
0eacb8e
Traits_d and Duality devs
umenohana13 Nov 4, 2025
a899c7c
Merge remote-tracking branch 'cgal/main' into Homology-new_package-AB
afabri Nov 4, 2025
1116f20
Triangulation_3_io
umenohana13 Nov 4, 2025
9eb78a0
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Nov 4, 2025
b86ae77
CGAL CDT3 dualization
umenohana13 Nov 4, 2025
23c0b41
Duality with CDT3 CGAL
umenohana13 Nov 4, 2025
2c4855c
Use Exact_predicates_inexact_constructions_kernel
afabri Nov 4, 2025
6d10587
Duality with CGAL CDT3
umenohana13 Nov 6, 2025
c789748
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Nov 6, 2025
6de1cd0
Fixes
umenohana13 Nov 7, 2025
d2a512e
Fix
umenohana13 Nov 7, 2025
22931c6
Fixes
umenohana13 Nov 7, 2025
a870e75
Fix
umenohana13 Nov 13, 2025
8676bee
Fixes
umenohana13 Nov 18, 2025
aff1aa0
Fixes
umenohana13 Nov 18, 2025
6beac0e
Fixes (Z2 and Zp)
umenohana13 Nov 18, 2025
bf0d7b4
Fixes
umenohana13 Nov 18, 2025
9cf16bf
Make that degree_function has no link
afabri Nov 20, 2025
ca098ec
fix link
afabri Nov 20, 2025
e1051a7
Duality fix
umenohana13 Nov 21, 2025
91dd777
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Nov 21, 2025
3f67415
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Nov 24, 2025
0d6b9b4
CGAL CDT3: help needed
umenohana13 Nov 25, 2025
5bcf5eb
Add @param
afabri Nov 25, 2025
435b674
Fix dualize()
afabri Nov 26, 2025
8cfc4f4
Duality fixes
umenohana13 Dec 2, 2025
18d6d5e
Add @param
afabri Dec 2, 2025
93c1bd4
write_VTK fixes
umenohana13 Dec 2, 2025
5631c34
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Dec 2, 2025
e0ba225
Move Z2 and Zp to Number_types
afabri Dec 2, 2025
806f74e
Move Z2 and Zp to Number_types
afabri Dec 2, 2025
228b9e0
move files in another doxygen group
afabri Dec 2, 2025
872da26
calculate -> compute
afabri Dec 2, 2025
d8a7acc
Add links fdor Zp and Z2
afabri Dec 2, 2025
73c7872
Add a doxygen group for IO classes
afabri Dec 2, 2025
02b9720
Add package description
afabri Dec 2, 2025
dd94c56
typos
afabri Dec 2, 2025
582b81a
typos
afabri Dec 2, 2025
0bfba03
typos
afabri Dec 2, 2025
508affe
typos
afabri Dec 2, 2025
179f2df
typos
afabri Dec 2, 2025
33337fc
Typos
umenohana13 Dec 12, 2025
d109d59
Implemented dimension restriction
umenohana13 Jan 9, 2026
66e50ae
Dimension restriction for persistence
umenohana13 Jan 14, 2026
407a789
Exceptions in Abstract_simplicial_chain_complex
umenohana13 Jan 14, 2026
9dfde20
Exceptions Cub_object_io
umenohana13 Jan 14, 2026
5075478
Fixes
umenohana13 Jan 14, 2026
c022381
Fixes
umenohana13 Jan 14, 2026
dc3a71e
Fixes
umenohana13 Jan 14, 2026
9f37c50
Fixes
umenohana13 Jan 14, 2026
f338c15
Fixes
umenohana13 Jan 14, 2026
e600e0c
fix doc warnings
sloriot Jan 15, 2026
db1b577
add missing throw
sloriot Jan 15, 2026
248b811
fix backticks
sloriot Jan 15, 2026
c020470
typos
sloriot Jan 15, 2026
9810385
clean up
sloriot Jan 15, 2026
94011fa
Fixes
umenohana13 Jan 15, 2026
1f32f7f
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Jan 15, 2026
16f3397
Change one exception documentation
afabri Jan 15, 2026
b677b6f
Fixes
umenohana13 Jan 15, 2026
9c40709
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 Jan 15, 2026
de7d7c3
Fixes
umenohana13 Jan 15, 2026
d2b9a03
Added "is_valid_pair" operations
umenohana13 Jan 16, 2026
99c1790
z and co_z functions
umenohana13 Jan 17, 2026
a36227b
Methods hd, htdt
umenohana13 Jan 18, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1172,3 +1172,5 @@ patches_after_merge.ply
CMakeUserPresets.json
/.cache
compile_commands.json
/HDVF/test/HDVF/tmp
/HDVF/examples/HDVF/tmp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CGAL {
\ingroup PkgAlgebraicFoundationsRef

The template function `compare()` compares the first argument with respect to
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger than \f$ y\f$.
the second.

In case the argument types `NT1` and `NT2` differ,
`compare` is performed with the semantic of the type determined via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ class Conforming_constrained_Delaunay_triangulation_3
*/
CDT_3_signed_index face_constraint_index(typename Triangulation::Cell_handle ch, int i) const
{
return ch->face_id[static_cast<unsigned>(i)];
return ch->ccdt_3_data().face_constraint_index(i);
}

/*!
Expand Down
4 changes: 4 additions & 0 deletions Documentation/doc/Documentation/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@
\package_listing{Stream_lines_2}
\package_listing{Classification}
\package_listing{Heat_method_3}

\cgalPackageSection{PartTopology,Topology}

\package_listing{Surface_mesh_topology}
\package_listing{HDVF}

\cgalPackageSection{PartSearchStructures,Spatial Searching and Sorting}

Expand Down
136 changes: 136 additions & 0 deletions HDVF/doc/HDVF/Concepts/AbstractChainComplex.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/*!
\ingroup PkgHDVFConcepts
\cgalConcept

The concept `AbstractChainComplex` describes the requirements for (topological) chain complexes associated to abstract complexes used in the concept `HDVF`.

It provides methods to:

- get the dimension of the complex, the number of cells in each dimension
- get the boundary and co-boundary of cell(s)
- get the vertices of a given cell
- output the complex in text format

Cells are indexed along each dimension and thus identified by their index together with their dimension.


\cgalHasModelsBegin
\cgalHasModelsBare{`CGAL::Homological_discrete_vector_field::Abstract_simplicial_chain_complex<IntegralDomainWithoutDivision>`}
\cgalHasModelsBare{`CGAL::Homological_discrete_vector_field::Sub_chain_complex_mask<IntegralDomainWithoutDivision, AbstractChainComplex>`}
\cgalHasModelsEnd

*/

class AbstractChainComplex
{
public:
/// \name Types
/// @{

/*!
Type of coefficients ring used to compute homology, model of `IntegralDomainWithoutDivision`
*/
typedef CoefficientRing Coefficient_ring;

/*!
Type of column-major chains (returned by the boundary operator)
*/
typedef CGAL::OSM::Sparse_chain<CoefficientRing, CGAL::OSM::COLUMN> Column_chain;

/*!
Type of row-major chains (returned by the co-boundary operator)
*/
typedef CGAL::OSM::Sparse_chain<CoefficientRing, CGAL::OSM::ROW> Row_chain ;

/*!
Type of column-major sparse matrices (used to store the boundary operator)
*/
typedef CGAL::OSM::Sparse_matrix<CoefficientRing, CGAL::OSM::COLUMN> Column_matrix;

/// @}

/// \name Operators
/// @{

/*!
Assignment operator.

The operator creates a copy of `complex`.
*/
AbstractChainComplex& operator= (const AbstractChainComplex& complex);

/// @}

/// \name Access functions
/// @{

/*!
Returns the dimension of the complex, that is, the largest dimension of cells.
*/
int dimension();

/*!
Returns the number of cells of dimension `q`.
If `q` is negative of larger than the dimension of the complex, returns 0.
*/
size_t number_of_cells(int q);

/*!
\brief Returns all boundary matrices.

The function returns constant reference to a vector of column-major sparse matrices. The `q`-th element of this vector is the matrix of \f$\partial_q\f$, which gives the boundary of cells of dimension `q`(as a linear combination of `q`-1 cells).

*/
const vector<Column_matrix> & boundary_matrices() const;

/*!
\brief Returns the boundary matrix of dimension `q` (ie.\ the matrix of \f$\partial_q\f$).

The function returns a column-major sparse matrices.
*/
const Column_matrix & boundary_matrix(int q) const;

/*!
\brief Returns the boundary of the cell of index `id_cell` in dimension `q`.

This boundary is a finite linear combination of cells of dimension `q`-1. It is encoded as a column-major chain (which maps each cell with a non-zero coefficient to this coefficient). This boundary is thus the `id_cell`-th column of the boundary matrix in dimension `q`.

*/
Column_chain d(size_t id_cell, int q);


/*!
\brief Returns the co-boundary of the cell of index `id_cell` in dimension `q`.

This boundary is a finite linear combination of cells of dimension `q`+1. It is encoded as a row-major chain (which maps each cell with a non-zero coefficient to this coefficient). This co-boundary is thus the `id_cell`-th row of the boundary matrix in dimension `q`+1.
*/
Row_chain cod(size_t id_cell, int q);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does cod stand for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes with d : usually we use d for the boundary operator, and d^* for the co-boundary, I wrote cod for co-d.
In our (finite dimension) context, it's just the operator which matrix is the transpose of d (but in a more general context, the definition is more complex.
Is it unclear?


/*!
\brief Returns the vertices of a given cell (that is, the indices of its faces of dimension 0).

*/
std::vector<size_t> bottom_faces(size_t id_cell, int q) const;

/*!
* \brief Returns the cofaces of a given chain in dimension `q`.
*
* The resulting chain, whatever the storage format of the input, is column-major, lies in dimension `q`+1 and is null if this dimension exceeds the dimension of the complex.
*
* \tparam CoefficientR `CoefficientRing` of the chain.
* \tparam StorageF `StorageFormat` of the chain.
*/
template <typename CoefficientR, int StorageF>
Column_chain cofaces_chain (SparseChain<CoefficientR, StorageF> chain, int q) const;

/// @}

};


/*!
\relates AbstractChainComplex
Inserts the chain complex in text mode in the stream.
*/
std::ostream& operator<<(std::ostream& out, const AbstractChainComplex& complex) const;

181 changes: 181 additions & 0 deletions HDVF/doc/HDVF/Concepts/Filtration.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
/*!
\ingroup PkgHDVFConcepts
\cgalConcept

The concept `Filtration` describes the requirements for persistent filtrations associated to persistent homology computation.

A filtration is associated to an `AbstractChainComplex`. Each cell is equiped with a scalar value (called its degree) and the filtration is an enumeration of cells in any dimension by increasing degrees.

A filtration class provides:

- an iterator to visit all cells by increasing degrees.
- getters to get the degree of a cell, and the cell of a given index along the filtration.
- an overload of `operator<<()` to output filtrations.

Cells are indexed along each dimension and thus identified by their index together with their dimension.

\cgalHasModelsBegin
\cgalHasModelsBare{`CGAL::Homological_discrete_vector_field::Filtration_core<ChainComplex,Degree>`}
\cgalHasModelsBare{`CGAL::Homological_discrete_vector_field::Filtration_lower_star<ChainComplex,Degree>`}
\cgalHasModelsEnd

*/

class Filtration
{
public:
/*! \brief Type of the underlying complex. */
typedef unspecified_type Complex;

/*! \brief (Scalar) type of degrees (model of `RealEmbeddable`).
*/
typedef unspecified_type Degree ;

/*! \brief Type of coefficients used to compute homology. */
typedef Complex::Coefficient_ring Coefficient_ring;

/*! \brief Type for indexing uniquely a cell.
*
* As stated in `AbstractChainComplex`, cells are identified by their dimension, together with their index along this dimension. The type `Cell` stores this pair:
*
* - First element of the pair: index of the cell.
* - Second element of the pair: dimension of the cell.
*/
typedef std::pair<size_t, int> Cell ;

/*! \brief Value type of the filtration iterator.
* Contains a cell (identified by its index and dimension in a `Cell`) and its associated degree.
*/
typedef struct {
Cell cell_dim ;
Degree degree ;
} Filtration_iter_value ;

protected:
/*!
Type of column-major sparse matrices.
*/
typedef SparseMatrix<Coefficient_ring,CGAL::OSM::COLUMN> Column_matrix ;

/*!
Type of row-major sparse matrices.
*/
typedef SparseMatrix<Coefficient_ring,CGAL::OSM::ROW> Row_matrix ;

/*!
Type of column-major chains.
*/
typedef SparseChain<Coefficient_ring,CGAL::OSM::COLUMN> Column_chain ;

/*!
Type of row-major chains.
*/
typedef SparseChain<Coefficient_ring,CGAL::OSM::ROW> Row_chain ;

public:
/**
* \brief The iterator over filtration.
*
* Iterate the filtration by increasing degrees.
*/
struct iterator
{
// Iterator tags
using iterator_category = std::forward_iterator_tag;
using difference_type = std::ptrdiff_t;
using value_type = Filtration_iter_value;

/*! Iterator constructor
*/
iterator(const Filtration& f, size_t i=0);

/*! Dereference operator.
*/
value_type operator*() const;

/*! Gets the index (time) associated to the iterator.
*/
size_t time () const ;

/*! Gets the `Cell` (cell and its dimension) associated to the iterator.
*/
Cell cell_dim () const ;

/*! Gets the degree associated to the iterator.
*/
Degree degree () const ;

/*!
* \brief Prefix incrementation.
* Move to next index in the filtration.
*/
iterator& operator++();

/*! \brief Postfix incrementation.
*/
iterator operator++(int);

/*!
* \brief Equality check.
* \returns True if the indices are equal.
*/
friend bool operator== (const iterator& a, const iterator& b);

/*!
* \brief Inequality check.
* \returns True if the indices are different.
*/
friend bool operator!= (const iterator& a, const iterator& b);
};

/*!
* \brief Iterator to the beginning of the filtration.
*/
iterator begin();

/*!
* \brief Returns a past-the-end iterator.
*/
iterator end();

// getters
/*! \brief Gets the filtration size.
*/
size_t size () const;

/*! \brief Gets the cell (that is cell index and dimension) at the index `i` of the filtration.
*/
Cell cell_index_dimension (size_t i) const;

/*! \brief Gets the degree of the `i`th element of the filtration.
*/
Degree degree (size_t i) const;

// Filtration verification
/*! \brief Checks that a filtration is valid.
* Checks that cells are ordered in increasing degrees and all cells have indices larger than their faces.
*/
bool is_valid() const;

// Input/output filtration


/**
* \brief Exports the filtration time indices.
*
* The method exports the time index of every cell in each dimension.
*/
vector<vector<size_t> > export_filtration () const
};

/*!
\relates Filtration
\brief extracts a filtration from a stream.
*/
istream & operator>>(istream & in, Filtration &f);

/*!
\relates Filtration
\brief Inserts a filtration into a stream.
*/
ostream & operator<<(ostream & out, const Filtration &f);
Loading
Loading