docs(doxygen): 100% public-API coverage (228 → 0 undocumented)
Completes the work begun in the previous commit on this branch. Every
public symbol under code/include/ now carries a brief Doxygen comment
(0 undocumented per scripts/doxygen-coverage.sh, with the `detail::`
implementation namespaces excluded as before).
Trajectory on this branch:
start (after Doxyfile fix): 24.0 % (165 / 437 in the no-detail set
was 105 / 437 when detail counted)
after PR #17 base commit : 42.4 % (165 / 396)
this commit : 100.0 % (396 / 396)
Files touched (all .hpp / .h headers under code/include/):
* cgal/Conformal_map_traits.h
* clausen.hpp, conformal_mesh.hpp, constants.hpp (already docd)
* cp_euclidean_functional.hpp, cut_graph.hpp, discrete_elliptic_utility.hpp
* euclidean_functional.hpp, euclidean_geometry.hpp, euclidean_hessian.hpp
* fundamental_domain.hpp, gauss_bonnet.hpp
* hyper_ideal_{functional,geometry,hessian,utility,visualization_utility}.hpp
* inversive_distance_functional.hpp, layout.hpp
* matrix_utility.hpp, mesh_builder.hpp, mesh_io.hpp
* newton_solver.hpp, p2_utility.hpp, period_matrix.hpp, projective_math.hpp
* serialization.hpp, spherical_functional.hpp, spherical_geometry.hpp
* spherical_hessian.hpp, viewer_utils.h
CI:
.gitea/workflows/doxygen-pages.yml now enforces
`scripts/doxygen-coverage.sh --threshold 100`, so any future regression
(a new public function landed without a `///` brief) fails the build
before the Doxygen HTML is published to Codeberg Pages.
Doxygen warnings remain at 0.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -52,8 +52,18 @@ namespace conformallab {
|
||||
// cot_k = (t_adj·l123 − t_opp·t_other) / (8·Area)
|
||||
//
|
||||
// Returns {0,0,0} for degenerate faces (triangle inequality violated or Area=0).
|
||||
struct EuclCotWeights { double cot1, cot2, cot3; bool valid; };
|
||||
/// Three Euclidean cotangent weights `(cot1, cot2, cot3)` for the
|
||||
/// vertices opposite to edges (l₂₃, l₃₁, l₁₂) of a triangle, plus a
|
||||
/// `valid` flag that is `false` when the triangle is degenerate.
|
||||
struct EuclCotWeights {
|
||||
double cot1; ///< Cotangent at vertex 1 (opposite to l₂₃).
|
||||
double cot2; ///< Cotangent at vertex 2 (opposite to l₃₁).
|
||||
double cot3; ///< Cotangent at vertex 3 (opposite to l₁₂).
|
||||
bool valid;///< `false` when the triangle is degenerate (triangle inequality violated or area = 0).
|
||||
};
|
||||
|
||||
/// Compute the three Euclidean cotangent weights from edge lengths.
|
||||
/// Returns `{0,0,0,false}` for degenerate triangles.
|
||||
inline EuclCotWeights euclidean_cot_weights(double l12, double l23, double l31)
|
||||
{
|
||||
const double t12 = -l12 + l23 + l31;
|
||||
@@ -81,15 +91,9 @@ inline EuclCotWeights euclidean_cot_weights(double l12, double l23, double l31)
|
||||
};
|
||||
}
|
||||
|
||||
// ── Analytical Hessian (cotangent Laplacian) ──────────────────────────────────
|
||||
//
|
||||
// Returns the n×n sparse Hessian matrix H where n = euclidean_dimension(mesh, m).
|
||||
//
|
||||
// Only vertex DOFs are supported. Edge DOFs (m.e_idx[e] >= 0) produce
|
||||
// additional mixed-derivative entries that are not yet implemented; this
|
||||
// function asserts they are absent.
|
||||
//
|
||||
// x – current DOF vector (used to compute effective log-lengths Λ̃ij).
|
||||
/// Analytical Euclidean Hessian (cotangent Laplacian), sparse.
|
||||
/// Only vertex DOFs are supported — the function asserts that no edge
|
||||
/// DOF is variable. `x` is used to compute effective log-lengths Λ̃ᵢⱼ.
|
||||
inline Eigen::SparseMatrix<double> euclidean_hessian(
|
||||
ConformalMesh& mesh,
|
||||
const std::vector<double>& x,
|
||||
@@ -168,11 +172,9 @@ inline Eigen::SparseMatrix<double> euclidean_hessian(
|
||||
}
|
||||
|
||||
// ── Finite-difference Hessian check ──────────────────────────────────────────
|
||||
//
|
||||
// Compares the analytical Hessian column-by-column against
|
||||
// H_fd[:, j] = (G(x + ε·eⱼ) − G(x − ε·eⱼ)) / (2ε).
|
||||
//
|
||||
// Returns true if max relative error < tol for every entry.
|
||||
/// FD Hessian check for the Euclidean functional. Compares analytic
|
||||
/// `H` column-by-column to `(G(x+εeⱼ) − G(x−εeⱼ)) / (2ε)`; returns
|
||||
/// `true` iff max relative error is below `tol`.
|
||||
inline bool hessian_check_euclidean(
|
||||
ConformalMesh& mesh,
|
||||
const std::vector<double>& x0,
|
||||
|
||||
Reference in New Issue
Block a user