docs(doxygen): fix critical extraction bug; baseline 24% → 42% on public API
ROOT CAUSE FIX
The Doxyfile EXCLUDE_PATTERNS line contained `*/* 2.hpp` (note the
space — a stray glob from macOS-style "foo 2.hpp" duplicate files).
That pattern was silently matching ALL .hpp / .h files, so Doxygen was
indexing nothing under code/include/. The pre-existing 556 KB of HTML
output was effectively documenting only README.md, CLAUDE.md and a
small stub for std:: — not the C++ API at all.
After fixing the pattern (and properly escaping the space-prefixed
"foo 2.hpp / foo 2.h" macOS-dup patterns), Doxygen now extracts 141
compounds and emits 248 HTML pages from the public headers.
WHAT THIS PR ADDS
1. Doxyfile fix: correct EXCLUDE_PATTERNS; add GENERATE_XML for the
coverage measurement script; add MathJax for `$$...$$` math in
markdown; add the missing CGAL `\cgalParamNBegin/End/Description/
Default/...` aliases so CGAL-style param blocks render correctly.
2. New headers:
- code/include/CGAL/Conformal_map/doxygen_groups.h
defines `PkgConformalMap{,Ref,Concepts,NamedParameters}`,
resolving 17 prior "non-existing group" warnings.
- code/include/CGAL/Conformal_map/doxygen_namespaces.h
gives every namespace under `CGAL::` and `conformallab::` a
brief description.
3. New tool: scripts/doxygen-coverage.sh
Parses the XML output and reports % of public symbols (excluding
the `detail::` implementation namespaces by default) that have a
non-empty brief/detailed description. Supports `--list-undoc`
and `--threshold N` for CI integration.
4. Substantial docstring additions to the public CGAL headers:
`Conformal_map_traits.h`, `Discrete_circle_packing.h`,
`Discrete_inversive_distance.h`, `conformal_mesh.hpp`,
`Discrete_conformal_map.h` (Hyper_ideal_map_result fields).
5. Markdown housekeeping that the strict-warning Doxygen run surfaced:
tests.md (escape literal `#` in table cell),
locked-vs-flexible.md (broken section anchor),
overall_pipeline.md (replace `$$LaTeX$$` with inline-unicode math).
CURRENT NUMBERS
before: ~24% documented (public API; the prior "87%" claim was
based on the broken extraction)
after: 42% documented (165 of 396 public symbols)
warnings: 0 (was 27 spurious + a flood of bogus undocumented
warnings hidden by the buggy EXCLUDE pattern)
NEXT (in a follow-up commit on this branch)
The remaining 231 public symbols (mostly in `layout.hpp`,
`hyper_ideal_functional.hpp`, `spherical_functional.hpp`, the per-mode
functional/Hessian files) can be brought to ~100% with another pass of
short `///` brief descriptions. The coverage script is the gate; CI
can begin enforcing `--threshold 95` once the next pass lands.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -38,26 +38,51 @@ namespace CGAL {
|
||||
|
||||
// ── Default traits for CP-Euclidean ───────────────────────────────────────────
|
||||
|
||||
/*!
|
||||
\ingroup PkgConformalMapConcepts
|
||||
\brief Traits class for `discrete_circle_packing_euclidean()` —
|
||||
declares the kernel, mesh and property-map types used by the
|
||||
BPS-2010 face-based circle-packing functional.
|
||||
|
||||
Primary template; specialise it for non-`Surface_mesh` triangle meshes.
|
||||
*/
|
||||
template <typename TriangleMesh,
|
||||
typename Kernel_ = CGAL::Simple_cartesian<double>>
|
||||
struct Default_cp_euclidean_traits;
|
||||
|
||||
/*!
|
||||
\ingroup PkgConformalMapConcepts
|
||||
\brief Specialisation for `CGAL::Surface_mesh<P>`; the only one shipped
|
||||
in Phase 8b-Lite.
|
||||
*/
|
||||
template <typename K>
|
||||
struct Default_cp_euclidean_traits<CGAL::Surface_mesh<typename K::Point_3>, K>
|
||||
{
|
||||
/// CGAL kernel parameter (defaults to `Simple_cartesian<double>`).
|
||||
using Kernel = K;
|
||||
/// Scalar field type used for all CP-Euclidean DOFs (`ρ_f`, `θ_e`, `φ_f`).
|
||||
using FT = typename K::FT;
|
||||
/// 3-D point type (vertex coordinates).
|
||||
using Point_3 = typename K::Point_3;
|
||||
/// Triangle-mesh type this specialisation targets.
|
||||
using Triangle_mesh = CGAL::Surface_mesh<Point_3>;
|
||||
|
||||
/// Boost-graph vertex descriptor for `Triangle_mesh`.
|
||||
using Vertex_descriptor = typename boost::graph_traits<Triangle_mesh>::vertex_descriptor;
|
||||
/// Boost-graph half-edge descriptor for `Triangle_mesh`.
|
||||
using Halfedge_descriptor = typename boost::graph_traits<Triangle_mesh>::halfedge_descriptor;
|
||||
/// Boost-graph edge descriptor for `Triangle_mesh`.
|
||||
using Edge_descriptor = typename boost::graph_traits<Triangle_mesh>::edge_descriptor;
|
||||
/// Boost-graph face descriptor for `Triangle_mesh`.
|
||||
using Face_descriptor = typename boost::graph_traits<Triangle_mesh>::face_descriptor;
|
||||
|
||||
// CP-Euclidean property maps — note the *face* DOF index map.
|
||||
|
||||
/// Property map face → contiguous integer DOF index (legacy `cf:idx`).
|
||||
using Face_index_pmap = typename Triangle_mesh::template Property_map<Face_descriptor, int>;
|
||||
/// Property map edge → intersection angle θₑ (legacy `ce:theta`).
|
||||
using Theta_e_pmap = typename Triangle_mesh::template Property_map<Edge_descriptor, FT>;
|
||||
/// Property map face → target angle sum φ_f (legacy `cf:phi`).
|
||||
using Phi_f_pmap = typename Triangle_mesh::template Property_map<Face_descriptor, FT>;
|
||||
};
|
||||
|
||||
@@ -75,8 +100,11 @@ struct Circle_packing_result
|
||||
/// Face DOFs `ρ_f = log R_f` (length = num_faces(mesh); pinned face = 0).
|
||||
std::vector<FT> rho_per_face;
|
||||
|
||||
/// Newton iterations actually performed (≤ `max_iterations`).
|
||||
int iterations = 0;
|
||||
/// Final infinity-norm of the gradient (Newton stopping criterion).
|
||||
FT gradient_norm = FT(0);
|
||||
/// `true` iff `gradient_norm < gradient_tolerance` at exit.
|
||||
bool converged = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user