Skip to content

Homological Discrete Vector Fields - #9004

Open
umenohana13 wants to merge 348 commits into
CGAL:mainfrom
umenohana13:Homology-new_package-AB
Open

umenohana13 wants to merge 348 commits into
CGAL:mainfrom
umenohana13:Homology-new_package-AB

Conversation

@umenohana13

@umenohana13 umenohana13 commented Jul 29, 2025 •

Copy link
Copy Markdown

Summary of Changes

The pull request contains the first version of:

  • user manual (still incomplete - persistant homology and Alexander duality are not documented)
  • reference manual (slightly incomplete as well - the IO classes stores in tools_io are "lightly" documented as they will be revised to integrate IOs inside CGAL)
  • code (same: the tools_io file will be revised)

Release Management

@MaelRL MaelRL added Not yet approved The feature or pull-request has not yet been approved. Feature CHANGES.md not updated labels Jul 29, 2025
@MaelRL MaelRL added this to the 6.2-beta milestone Jul 29, 2025
@MaelRL MaelRL changed the title Homology new package ab Homological Discrete Vector Fields Jul 29, 2025
@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

afabri commented Aug 4, 2025

Copy link
Copy Markdown
Member

@umenohana13 I started fixing errors showing up in the CI, but there are too many to make. It is now headers compiled in isolation which do not #include all they use. And missing std:: before cout etc.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

Comment thread HDVF/doc/HDVF/Concepts/AbstractChainComplex.h Outdated
Comment thread HDVF/doc/HDVF/Concepts/AbstractChainComplex.h Outdated
Comment thread HDVF/doc/HDVF/Concepts/AbstractChainComplex.h Outdated

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
Copy Markdown
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
Copy Markdown
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?

Comment thread HDVF/doc/HDVF/Concepts/Filtration.h Outdated

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AbstractSimplicialComplex has no link.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oups, it's "AbstractChainComplex".
DONE

/*!
* \brief Gets HDVF option.
*/
int hdvf_opts ();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

option() or options()

*
* The function returns `true` if the reduced boundary matrix is null and `false` otherwise.
*/
bool is_perfect_hdvf();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is_perfect()

Comment thread HDVF/doc/HDVF/Concepts/HDVF.h Outdated
/// @{

/*!
* \brief A operation: pairs two critical cells.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you should systematically write A-operation to avoid confusion with the word "A".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In fact at some places you write A() operation which is also ok.

Comment thread HDVF/doc/HDVF/Concepts/HDVF.h Outdated
* \param verbose If `true`, all intermediate reductions are printed out.
*
*/
std::vector<Pair_cells> compute_perfect_hdvf(bool verbose = false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe replace Pair_cells with Cell_pair

Comment thread HDVF/doc/HDVF/Concepts/HDVF.h Outdated
virtual std::vector<std::vector<int> > psc_labels () const;

/*!
* \brief Returns a chain containing the homology generator associated to `cell` (critical cell) of dimension `q` (in particular for vtk export).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* \brief Returns a chain containing the homology generator associated to `cell` (critical cell) of dimension `q` (in particular for vtk export).
* \brief Returns a chain containing the homology generator associated to `cell` (critical cell) of dimension `q`.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

Comment thread HDVF/doc/HDVF/Concepts/HDVF.h Outdated
Comment thread HDVF/include/CGAL/HDVF/Hdvf_core.h
Comment thread HDVF/include/CGAL/OSM/Sparse_chain.h Outdated
afabri and others added 8 commits May 21, 2026 07:38
-> Full_lu
-> Hdvf
-> Couldn't understand how to call generic functions (for Zp and int)?
-> Sparse matrices now receive the sparse chain type as a tparam
-> Updated all classes accordingly
-> All tests are OK
-> Concepts updated (need checks especially for AbstractSimplicialChainComplex - how to describe the Sparse_matrix structure passed as argument...)
-> review all the code / examples / tests to comply with new structure
@todo: check the documentation (related modifications are commented with warnings)
@afabri

afabri commented Jun 15, 2026

Copy link
Copy Markdown
Member

/force-build:v0

@github-actions

Copy link
Copy Markdown

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9004/v0/Manual/index.html

Number_types
Circulator
Stream_support
Surface_mesh

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Surface_mesh
Surface_mesh
Triangulation_3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We then get a link here

*
* \brief Comparison of two COLUMN matrices.
*/
template <typename _CT, template <typename, int> typename SCT>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You have to write what SCT means


/** \relates Sparse_matrix_core
*
* \brief Comparison of a COLUMN and a ROW matrix.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* \brief Comparison of a COLUMN and a ROW matrix.
* \brief Comparison of a `COLUMN` and a `ROW` matrix.

@MaelRL MaelRL modified the milestones: 6.3-beta, 6.4-beta Sep 24, 2026
@sloriot

sloriot commented Oct 15, 2026

Copy link
Copy Markdown
Member

@albert-github confirmed that the backtick issue in \exception is fixed in doxygen 1.18.0 and so was a bug in 1.17.0. The fix is in doxygen/doxygen#12172. We can backport it in our custom build if we haven't switch to a newer version when integrating this PR.

@gdamiand

Copy link
Copy Markdown
Member

/force-build:v0

@github-actions

Copy link
Copy Markdown

There was an error while building the doc:

Traceback (most recent call last):
  File "/home/runner/work/cgal/cgal/Documentation/doc/scripts/html_output_post_processing.py", line 400, in <module>
    main()
  File "/home/runner/work/cgal/cgal/Documentation/doc/scripts/html_output_post_processing.py", line 325, in main
    re_replace_in_file("'src','ftv2",
  File "/home/runner/work/cgal/cgal/Documentation/doc/scripts/html_output_post_processing.py", line 89, in re_replace_in_file
    with codecs.open(fname, encoding='utf-8') as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 918, in open
FileNotFoundError: [Errno 2] No such file or directory: 'Manual/dynsections.js'
make[3]: *** [CMakeFiles/doc_with_postprocessing.dir/build.make:70: CMakeFiles/doc_with_postprocessing] Error 1
make[2]: *** [CMakeFiles/Makefile2:13366: CMakeFiles/doc_with_postprocessing.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:13373: CMakeFiles/doc_with_postprocessing.dir/rule] Error 2
make: *** [Makefile:5162: doc_with_postprocessing] Error 2

https://github.com/CGAL/cgal/actions/runs/38874500086

@albert-github

Copy link
Copy Markdown
Contributor

The problem regarding dynsections.js might be related to #9539
(CC: @sloriot )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CHANGES.md not updated Feature Not yet approved The feature or pull-request has not yet been approved. TODO (web)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants