-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Homological Discrete Vector Fields #9004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
umenohana13
wants to merge
258
commits into
CGAL:main
Choose a base branch
from
umenohana13:Homology-new_package-AB
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27,421
−6
Open
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 81439d3
HDVF rework
umenohana13 01dcca5
Changed Hdvf class names + namespace
umenohana13 85b0334
HDVF concept, HDVF classes
umenohana13 cb2d600
HDVF review
umenohana13 d696cf2
Hdvf
umenohana13 fde3905
Hdvf_persistence, Filtration
umenohana13 3ea95fc
Sub_chain_complex_mask
umenohana13 184305f
Concept SparseMatrix
umenohana13 c1363e1
Sparse_matrix
umenohana13 40c2864
Sparse_chain
umenohana13 c58e7a5
Sparse_chain, Sparse_matrix
umenohana13 720f5f6
Sub_sparse_matrix
umenohana13 d8e7b0b
Hdvf_duality
umenohana13 10a4322
Hdvf_persistence
umenohana13 c6dd6b0
First "full" commit
umenohana13 fe1bcd7
HDVF in progress
umenohana13 6f22d60
HDVF and classes rework
umenohana13 e807247
Hdvf_persistence
umenohana13 b5d87ba
HDVF
umenohana13 e974c23
Hdvf, Hdvf_core (correction type des indices)
umenohana13 609334f
All HDVFs + Abstract_simplicial_complex + tools_io
umenohana13 3fab408
Cubical_chain_complex and tools (int->size_t corrected)
umenohana13 79ffb5d
Chain complex concepts corrected
umenohana13 57528d2
Full revision OK
umenohana13 8bb8ef8
Revised vtk output
umenohana13 b10bf6d
References update
umenohana13 9fbdd4f
User manual ongoing
umenohana13 9b3b8c5
User manual ongoing
umenohana13 cf20df6
User doc + before bug correction
umenohana13 ffe9ff0
Bug on find_pair_M family + user doc
umenohana13 4a80b5f
User manual
umenohana13 9115ab5
User manuel, Sparse_matrix bug corrected
umenohana13 6621100
Preliminary user manual, preliminary release of the code
umenohana13 01a5b04
User + ref manuals
umenohana13 b5c05ac
Fixes
umenohana13 ab814ec
deal with pkg-small.png
afabri 0c2a8ce
fixes for /build
afabri 624012f
fixes for /build
afabri 05de5d4
trailing whitespace
afabri 89d39c9
fix namespaces
afabri 6470aab
fix namespaces
afabri 86ae7d1
fix namespaces
afabri dc32293
namespaces
afabri 678fd1b
Fix
umenohana13 da1f0b4
Fixes
umenohana13 39cf002
Tests
umenohana13 85506a8
typos
afabri 23e29f5
Add license check
afabri f0974f5
Add CMakeLists.txt
afabri 50a04c7
more license checks and typos
afabri a3f0c2b
more license checks
afabri e1c2f57
untabify
afabri 923229e
trailing whitespace
afabri 241a7da
Add license header
afabri ed712ca
The beginning of fixes to make for the CI, and not only
afabri 45ddce6
Fixes
umenohana13 2d20ef4
Review AbstractChainComplex + Filtration
umenohana13 51575f9
GeometricChainComplex and HDVF OK
umenohana13 b4465d1
Fixes of 1st round
umenohana13 8239467
Fixes
umenohana13 bb36619
Update HDVF/doc/HDVF/Concepts/AbstractChainComplex.h
afabri 27a3cae
Fixes
umenohana13 2df3adf
Apply suggestions from code review
umenohana13 6d82cce
Fixed "using namespace std"
umenohana13 a8d7751
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 4e68cc6
Tests - fixes
umenohana13 d417033
Test (test_sparse_matrices)
umenohana13 e741f9b
Update HDVF/doc/HDVF/Concepts/HDVF.h
afabri 5559fd5
For VC++: Replace not; Add typename; move abs() out of Z2
afabri f17503e
Fixe + example persistance
umenohana13 7f3852a
Fixes
umenohana13 f22e2d8
Fixes + test_mesh_object_io
umenohana13 3dc5228
Documentation
umenohana13 627dab9
fix friend in Sparse_matrix
afabri 62de90d
Fix
umenohana13 abff582
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 7ccfddb
Fixes
umenohana13 2c150e7
Test Abstract_simplicial_chain_complex
umenohana13 b338fc4
ws
afabri 1b3718c
Fixes
umenohana13 fe77eb4
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 70af234
Update HDVF/include/CGAL/HDVF/Geometric_chain_complex_tools.h
afabri fdaa3ba
Fixes
umenohana13 31c65d7
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 1356634
Fixes
umenohana13 27c2264
Rework of Hdvf_persistence types
umenohana13 a27adf5
Hdvf_persistence rework
umenohana13 6835047
For Andreas (problem with << overload)
umenohana13 32a027f
Fixes
umenohana13 4bb875b
Update HDVF/include/CGAL/HDVF/Hdvf.h
afabri 8d8ec9e
Fixes
umenohana13 6af932f
Fixes
umenohana13 24d143a
Cubical_chain_complex fixes
umenohana13 561d873
Fix
umenohana13 d23c1cb
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
afabri 92434ec
Friends rework
umenohana13 f751d06
Friends rework
umenohana13 17f8a5b
Friends rework + fixes
umenohana13 5f47e36
Inline fixes
umenohana13 db7ec4e
Fixes
umenohana13 cdae059
Surface_mesh_io
umenohana13 dda2b8f
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
afabri b529ae1
Fixes
umenohana13 6f0a8c8
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 0dd833f
Fix
umenohana13 6632f62
indexes -> indices
afabri d49fbb8
indexes -> indices
afabri 56b31fc
friend -> relates
afabri b63e415
typos
afabri 8f27737
Remove \defgroup ChainChainComparison Compares two chains.
afabri 47d4139
fix \relates
afabri 7147f3c
\relates must be outside of the class
afabri b5b73ac
\relates must be outside of the class
afabri f7dc05f
\relates must be outside of the class
afabri b592327
Fixes
umenohana13 a1f6eb9
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 fc79996
Update AbstractChainComplex.h
umenohana13 947a7c5
Fix
umenohana13 2816a4b
Add Algebraic_structure_traits<Z2>
afabri 11a6260
vertices coordinates -> vertex coordinates
afabri 8c9636e
Add missing '}'
afabri 6234a4f
Add Real_embeddable_traits
afabri 9a885d9
Add AST::Is_square
afabri 4fb239f
It may be Uncertain<Comparison_result>
afabri bb5dedb
Update HDVF/doc/HDVF/Concepts/SparseChain.h
umenohana13 1999c63
Fixes
umenohana13 309185e
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 bfa35d7
Fixes
umenohana13 28b130a
Add two specializations of Algebraic_structure_traits for prime and n…
afabri f31b0bb
typos
afabri c639053
Fixes
umenohana13 da87747
Update Zp.h
umenohana13 c8f1f87
typos
afabri 0c1b1a8
Update HDVF/include/CGAL/HDVF/Hdvf_core.h
umenohana13 691eb09
Fix
umenohana13 0b81d47
Fix
umenohana13 f355ac8
Introduce geometric traits class
afabri 6d6bb3c
Added license header
afabri 538a3b3
Add tparam
afabri de3251f
Deal with 2D output
afabri 712a704
Add example for Surface_mesh
afabri 82b06be
Add example for Surface_mesh
afabri e8b4256
Drop prefix example_ from example file names
afabri 9678f5c
cleanup
afabri 7e01d99
Start fixing test
afabri d091029
Zp
umenohana13 67acf84
replace vertex_coords() with point()
afabri db13f2f
insert -> write
afabri f838e8f
insert -> write
afabri 4f2423f
Fixes
umenohana13 737b713
Fixes
umenohana13 8f2b1d6
I suggest that we always return const& which corresponds to keeping c…
afabri c5a53cb
Test for Zp
umenohana13 df624c1
Fixes
umenohana13 3e116b5
Fixes
umenohana13 da994a9
Add Hdvf_traits_d.h
afabri f7c594c
Merge cgal/main
afabri 9afad6a
Fixes
umenohana13 fdcc65d
Test Hdvf_core
umenohana13 a611a2a
Fixes
umenohana13 5b46717
If to_point() is in the traits you can call Traits().to_point(vec)
afabri 0603975
Fix (points / cubical chain complex)
umenohana13 a8583f3
Traits in various dimensions
umenohana13 419b57f
Moved read_nodes
umenohana13 7ce943c
Test Hdvf_traits_d <4>
umenohana13 5e5070e
dD needs Eigen, other fixes to make hdvf_simplicial_4.cpp compile
afabri 6b0f3b7
4D simplicial OK
umenohana13 1c27308
Fix
umenohana13 1cc4794
Add <Traits> so that examples compile
afabri 9ac1533
Some fixes for VC++
afabri 8a2f5fe
dD export improvement
umenohana13 2e60ff0
HDVF duality
umenohana13 6650921
Use Epick_d functors
afabri fbd399a
doc bug
afabri cb07f99
doc bug
afabri 4f0d5eb
At some place it needs the concept and not the class name. But needs…
afabri f3e013e
Move doc of Cell, so that Filtration_core doc shows up; boolean -> B…
afabri f9a75e6
replace concept with local typedef
afabri fc2b4ff
Add a typedef
afabri 869bbf5
cleanup
afabri 29e7388
cleanup
afabri 3c3a706
cleanup
afabri f0df21e
In the documentation of the concept we cannot put a model
afabri cb674af
In the documentation of the concept we cannot put a model
afabri 0eacb8e
Traits_d and Duality devs
umenohana13 a899c7c
Merge remote-tracking branch 'cgal/main' into Homology-new_package-AB
afabri 1116f20
Triangulation_3_io
umenohana13 9eb78a0
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 b86ae77
CGAL CDT3 dualization
umenohana13 23c0b41
Duality with CDT3 CGAL
umenohana13 2c4855c
Use Exact_predicates_inexact_constructions_kernel
afabri 6d10587
Duality with CGAL CDT3
umenohana13 c789748
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 6de1cd0
Fixes
umenohana13 d2a512e
Fix
umenohana13 22931c6
Fixes
umenohana13 a870e75
Fix
umenohana13 8676bee
Fixes
umenohana13 aff1aa0
Fixes
umenohana13 6beac0e
Fixes (Z2 and Zp)
umenohana13 bf0d7b4
Fixes
umenohana13 9cf16bf
Make that degree_function has no link
afabri ca098ec
fix link
afabri e1051a7
Duality fix
umenohana13 91dd777
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 3f67415
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 0d6b9b4
CGAL CDT3: help needed
umenohana13 5bcf5eb
Add @param
afabri 435b674
Fix dualize()
afabri 8cfc4f4
Duality fixes
umenohana13 18d6d5e
Add @param
afabri 93c1bd4
write_VTK fixes
umenohana13 5631c34
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 e0ba225
Move Z2 and Zp to Number_types
afabri 806f74e
Move Z2 and Zp to Number_types
afabri 228b9e0
move files in another doxygen group
afabri 872da26
calculate -> compute
afabri d8a7acc
Add links fdor Zp and Z2
afabri 73c7872
Add a doxygen group for IO classes
afabri 02b9720
Add package description
afabri dd94c56
typos
afabri 582b81a
typos
afabri 0bfba03
typos
afabri 508affe
typos
afabri 179f2df
typos
afabri 33337fc
Typos
umenohana13 d109d59
Implemented dimension restriction
umenohana13 66e50ae
Dimension restriction for persistence
umenohana13 407a789
Exceptions in Abstract_simplicial_chain_complex
umenohana13 9dfde20
Exceptions Cub_object_io
umenohana13 5075478
Fixes
umenohana13 c022381
Fixes
umenohana13 dc3a71e
Fixes
umenohana13 9f37c50
Fixes
umenohana13 f338c15
Fixes
umenohana13 e600e0c
fix doc warnings
sloriot db1b577
add missing throw
sloriot 248b811
fix backticks
sloriot c020470
typos
sloriot 9810385
clean up
sloriot 94011fa
Fixes
umenohana13 1f32f7f
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 16f3397
Change one exception documentation
afabri b677b6f
Fixes
umenohana13 9c40709
Merge branch 'Homology-new_package-AB' of github.com:umenohana13/mine…
umenohana13 de7d7c3
Fixes
umenohana13 d2b9a03
Added "is_valid_pair" operations
umenohana13 99c1790
z and co_z functions
umenohana13 a36227b
Methods hd, htdt
umenohana13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
|
|
||
| /*! | ||
| \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; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
codstand for?There was a problem hiding this comment.
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?