docs: full audit — fix 4 wrong port/research labels + consolidated research-track
Some checks failed
C++ Tests / test-fast (push) Successful in 2m50s
C++ Tests / test-fast (pull_request) Successful in 2m36s
API Docs / doc-build (pull_request) Successful in 1m10s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-cgal (pull_request) Failing after 10m25s

A full audit of `doc/` plus root-level markdown files (27 files) against
the actual ground truth in the C++ code and the local Java repository at
`/Users/tarikmoussa/Desktop/conformallab/` revealed four pre-existing
mis-labels and a stale test count.  All are corrected here.

Audit findings — corrected
─────────────────────────

1. **`InversiveDistanceFunctional` mis-labelled as Java port** (4 doc sites)
   Empirical verification:
       find /Users/tarikmoussa/Desktop/conformallab -iname "*nversive*"
       (zero matches)
   The class does NOT exist in `de.varylab.discreteconformal`.  The C++
   implementation is built from Luo 2004 + Glickenstein 2011 + Bowers-
   Stephenson 2004 — new research, not a port.
   Fixed in: java-parity.md, references.md, add-inversive-distance.md.

2. **HyperIdeal Hessian mis-labelled as "Java has analytic Hessian"**
   Empirical verification: `HyperIdealFunctional.java:295-298`:
       public boolean hasHessian() { return false; }
   Java has NO Hessian at all.  Both the FD (Phase 4a) and the block-FD
   (Phase 9b) Hessians in C++ are research beyond the Java port.  The
   chain rule (b,a) → ℓ → ζ → α/β is the *mathematical formulation*
   from Springborn 2020, not something Java implements.
   Fixed in: java-parity.md.

3. **Stale test count** README:87 said "28 suites, 170 tests" — current
   actual is 35 suites, 176 CGAL + 36 non-CGAL.  Fixed.

4. **Tutorial framing** — `add-inversive-distance.md` was framed as
   "porting an InversiveDistanceFunctional.java" that does not exist.
   Rewritten as "Implementing the Inversive-Distance functional from
   Luo 2004" with prominent verification block at top.

New document: `doc/roadmap/research-track.md`
─────────────────────────────────────────────

Consolidates everything in conformallab++ that goes beyond a Java port:

* Items already on `main`: HyperIdeal FD Hessian, period matrix τ
  partial-research components, Möbius holonomy storage.
* Items on open PRs: CP-Euclidean (PR #8, port), Inversive-Distance
  (PR #8, research), block-FD Hessian (PR #9, research).
* Planned research with full citations:
  - **Phase 9b-analytic** — full analytic HyperIdeal Hessian via
    Schläfli identity (Schläfli 1858/60) and chain rule through
    ζ₁₃/ζ₁₄/ζ₁₅, citing Springborn 2020 §4, Cho-Kim 1999,
    Glickenstein 2011 §4.  Includes acceptance-criteria checklist
    (per-case derivative cross-checks, gauge null space, PSD,
    measured ≥ 3× speed-up, LaTeX correctness note).
  - **Phase 9a.2-analytic** — analytic inversive-distance Hessian
    via Glickenstein 2011 eq. (4.6).
  - **Phase 10c** — full uniformization for genus g ≥ 2 (Fuchsian
    group representation) — fully new research, no Java reference.
  - **geometry-central** GC-1/2/3 exploratory track.

* Java backlog summary: 11 worth-porting Java classes identified by
  the parallel survey (FundamentalPolygonUtility, DiscreteHarmonicForm-
  Utility, DiscreteHolomorphicFormUtility, CanonicalBasisUtility,
  HyperbolicCyclicFunctional, QuasiisothermicUtility, KoebePolyhedron, …).
  ~6 500 Java lines, ~5 months of porting work, organised by phase.

Updated documents
─────────────────

* CLAUDE.md
  - New "Port-vs-research maintenance rule" with empirical verification
    command and the four corrected mis-labels.
  - Doc map: 23 → 24 documents (research-track.md added).

* README.md
  - Test count corrected (170 → 176+36).

* doc/math/references.md
  - Luo 2004 entry corrected ("new research" instead of "not yet ported").
  - New entries for Bowers-Stephenson 2004, Glickenstein 2011,
    Bobenko-Pinkall-Springborn 2010, Schläfli 1858/60.

* doc/roadmap/phases.md
  - Phase 9 reorganised: 9a split into 9a.1 (port) / 9a.2 (research),
    9b clarified as research (Java has no Hessian), 9c expanded with
    Java line counts and effort estimates.
  - Phase 10 reorganised: 10a/10b/10c with their Java prerequisites
    explicitly listed; 10c flagged as "fully new research".
  - Phase 10b' added: parallel research track (hyperbolic functional,
    quasi-isothermic, Möbius centering).
  - Phase 10c' added: optional Java-port additions (Koebe, circle
    patterns, electrostatic sphere).

* doc/roadmap/java-parity.md
  - Inversive-distance row:  Java,  C++ (Phase 9a.2) — new research.
  - CP-Euclidean row added:  Java,  C++ (Phase 9a.1) — port.
  - HyperIdeal Hessian row:  Java, ⚠️ FD + block-FD in C++.
  - Worth-porting table replaced with the survey results (12 classes,
    Java line counts, suggested phases).
  - "HyperIdeal Hessian: FD vs analytic" section rewritten with the
    correction notice.

* doc/tutorials/add-inversive-distance.md
  - Rewritten end-to-end with prominent verification block at top.
  - Now correctly framed as "Implementing the Inversive-Distance
    functional from Luo 2004" — research, not port.
  - Includes the four required cross-validations:
    limit cases, Bowers-Stephenson round-trip, FD-vs-analytic,
    cross-validation against euclidean_functional at u=0.
  - New "How to know if it's a port or research" closing section
    with the empirical verification command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-05-21 20:48:16 +02:00
parent e435e143c6
commit 4f0a3035e4
7 changed files with 721 additions and 184 deletions

View File

@@ -70,27 +70,63 @@ mesh type.
---
## ◼ Remaining porting — Phase 9
## ◼ Phase 9 — Mixed: remaining Java port + first research extensions
Java features from `de.varylab.discreteconformal` not yet in C++:
> **Audit 2026-05-21:** Phase 9 was originally framed as "remaining
> porting", but a closer look at the local Java repository revealed:
> several Phase-9 items are **not** in Java at all (`InversiveDistanceFunctional`
> does not exist; `HyperIdealFunctional.java:295-298` declares `hasHessian()=false`).
> The plan below now distinguishes Java-port items from research items.
> Full research catalogue: [`research-track.md`](research-track.md).
```
9a Inversive-distance functional (Luo 2004 / BowersStephenson)
→ inversive_distance_functional.hpp
Follows the exact same pattern as the three existing functionals.
→ newton_inversive_distance()
→ New test suite: test_inversive_distance.cpp
9a — Circle-packing functionals (split 2026-05-19)
─────────────────────────────────────────────────────
9b Analytic HyperIdeal Hessian
→ Replace FD Hessian in hyper_ideal_hessian.hpp
Direct differentiation through the chain:
(bᵢ, aₑ) → lᵢⱼ → ζ₁₃/ζ₁₄/ζ₁₅ → αᵢⱼ / βᵢ
Relevant for meshes > 500 DOFs (current FD Hessian is slow there).
9a.1 CPEuclideanFunctional (Java port)
→ cp_euclidean_functional.hpp
Java source: CPEuclideanFunctional.java (260 lines)
Mathematical reference: Bobenko-Pinkall-Springborn 2010
Status: 🟡 PR #8 open, 10 tests passing.
9c 4g-polygon boundary walk (genus g > 1)
→ Extend compute_fundamental_domain() beyond genus 1
Algorithm outline already in fundamental_domain.hpp as TODO(Phase 9).
Java reference: FundamentalDomainUtility.java
9a.2 Inversive-distance functional (RESEARCH, not a port)
→ inversive_distance_functional.hpp
Java source: NONE. Empirically verified.
Mathematical reference: Luo 2004 + Bowers-Stephenson 2004 + Glickenstein 2011
Status: 🟡 PR #8 open, 11 tests passing.
Cross-validation: G_id(0) = G_eu(0) at 1e-10 (Glickenstein §5).
9b — HyperIdeal Hessian (RESEARCH — Java has no Hessian at all)
─────────────────────────────────────────────────────────────────
9b Block-FD HyperIdeal Hessian
→ Replace full FD in hyper_ideal_hessian.hpp
Java source: NONE (HyperIdealFunctional.java:295-298 declares
hasHessian()==false; Java has NO Hessian).
Algorithm: per-face 6×6 block, scatter to global sparse matrix.
Status: 🟡 PR #9 open, 7 tests passing, ~96× speed-up measured.
9b-analytic Full analytic HyperIdeal Hessian via Schläfli identity
→ planned, see research-track.md
Mathematical source: Springborn 2020 §4 + Schläfli 1858/60
+ Cho-Kim 1999 + Glickenstein 2011 §4
Algorithm: explicit chain rule through (bᵢ,aₑ) → ℓᵢⱼ → ζ₁₃/ζ₁₄/ζ₁₅ → αᵢⱼ/βᵢ
Includes: short LaTeX correctness note in doc/math/.
Effort: 1014 days net. Trigger: profiling on V > 5000.
9c — Genus g > 1 fundamental domain (Java port + research extensions)
──────────────────────────────────────────────────────────────────────
9c 4g-polygon boundary walk (genus g > 1)
→ Extend compute_fundamental_domain() beyond genus 1
Java sources: FundamentalPolygonUtility.java (698 lines)
+ CanonicalFormUtility.java (532 lines)
+ CuttingUtility / SurgeryUtility (~800 lines)
Mathematical source: Poincaré 1882 + Sechelmann 2016 §5
Research component: bridging to conformallab++ cut_graph.hpp
+ holonomy infrastructure.
Effort: ~2 weeks for fundamental polygon, +2 weeks for surgery
layer, +1 week integration.
```
---
@@ -151,24 +187,61 @@ variational principle of BobenkoSpringborn 2004).
---
## ◼ New research — Phase 10+
## ◼ Phase 10 — Genus g ≥ 2 (research with partial Java support)
No direct Java reference implementation exists for these items.
Most Phase-10 items have partial Java references (utility classes for
forms and homology) but the **assembly** into a working uniformization
pipeline is research. Full catalogue with primary literature:
[`research-track.md`](research-track.md).
```
Phase 10 Global uniformization for genus g ≥ 2
10a Discrete holomorphic differentials
Integrate basis 1-forms ωᵢ along b-cycles of the cut graph.
Mathematical basis: BobenkoSpringborn (2004), §6.
Java partial reference: DiscreteHolomorphicFormUtility.java
10a Discrete holomorphic and harmonic 1-forms
Integrate basis 1-forms ωᵢ along b-cycles of the cut graph.
Mathematical reference: Bobenko-Springborn 2004 §6 + Mercat 2001.
Java sources (partial, port-with-research):
CanonicalBasisUtility.java 337 lines (homology basis)
HomologyUtility.java 122 lines
DualityUtility.java 308 lines
DiscreteHarmonicFormUtility.java 657 lines
DiscreteHolomorphicFormUtility.java 285 lines
Effort: ~6 weeks net (4 utility ports + 1 integration).
10b Siegel period matrix Ω ∈ H_g (g×g complex symmetric, Im(Ω) > 0)
Ωᵢⱼ = ∫_{bⱼ} ωᵢ
Reduction to Siegel fundamental domain via Sp(2g,).
Requires: 10a
Ωᵢⱼ = ∫_{bⱼ} ωᵢ
Reduction to Siegel fundamental domain via Sp(2g,).
Mathematical reference: Bobenko-Springborn 2004 + Gottschling 1959.
Java partial reference: DiscreteRiemannUtility.java (186 lines).
Requires: 10a.
Effort: ~1 week net after 10a.
10b' Alternative methods (parallel research track)
→ HyperbolicCyclicFunctional (Java, 530 lines) — completes the
classical three-mode set with hyperbolic energy.
→ Quasi-isothermic parametrisation (Lawson correspondence):
QuasiisothermicUtility.java + SinConditionApplication.java
(~1 200 Java lines combined).
→ MobiusCenteringFunctional (Java, 289 lines) — sphere centering.
Each independent; can be tackled in any order.
10c Full uniformization for genus g ≥ 2
Embedding as H²/Γ with Γ ⊂ PSL(2,) a Fuchsian group.
Requires: 10a + 10b + stable cut graph for g ≥ 2 (Phase 9c)
Embedding as H²/Γ with Γ ⊂ PSL(2,) a Fuchsian group.
Mathematical reference: Sechelmann 2016 §6 (discrete instance);
Bers 1960 (continuous theory).
Java reference: NONE — Java has the polygon + period matrix
pieces but does not assemble them into
a Fuchsian-group representation.
Status: **fully new research.**
Requires: 10a + 10b + Phase 9c.
10c' Optional Java-port additions (low priority)
→ KoebePolyhedron.java (321 lines) — Koebe-Andreev-Thurston
circle packings. Adds a fifth DCE method.
→ ElectrostaticSphereFunctional (127 lines) — sphere
distribution baseline.
→ CirclePatternLayout / CirclePatternUtility — face-circle
pattern layouts.
None of these are required for the genus-g uniformization
pipeline; they extend the breadth of methods.
```