Skip to content

Commit 82595ed

Browse files
committed
feat(hpc): PhiSpiral256 golden-spiral location codebook (anchor layer)
Implements the anchor layer of the PhiSpiral256 leaf-location codec per .claude/plans/PhiSpiral256-LeafPlanetarium-integration-plan.md — the orthogonal-location lane that recovers what PolarQuant (magnitude) discards. - SpiralChart::{Euclidean, Poincare{rho_max}} — equal-Euclidean-area (r=sqrt(u)) vs equal-hyperbolic-area (r=tanh(rho/2), arcosh-spaced). - PhiSpiralCenterQ15 — Q15 i16/i16/u16 fixed-point centers (the precise location tier; 256-anchor table is 1536 B). - PhiSpiral256::{new, center_xy, nearest, distance, k_nearest} — golden angle theta = 2*pi*frac(k/phi), nearest-anchor scalar scan, on-demand distance/neighbor (no stored 128 KB table). - PhiSpiralLeafAtom16 — packed (spiral_id, mag4, BGZ17 offset/stride family indices). BGZ17 = Base17, offset family in ~17..27, stride {2,4}; families are indices, not values. Grounding established this session by reading the real code: - golden-angle primitive already ships (surround_metadata::GOLDEN_ANGLE, holo Fibonacci carriers) — reused the constant, new sibling module. - pseudo-Poincare is free only near the origin (tanh(x)~x); the charts diverge toward the boundary where only a true Poincare chart preserves Mobius-equivariance. Documented as a regime, with tests for both. - precision ladder: Base17 (coarse) -> PhiSpiral256 (byte) -> i16/i16 (full). Module doc records the design trajectory (phase-centric, not offset/stride; a Gaussian splat = anchor + 2D covariance reusing splat3d Spd/conic, not a bare point; hemispheric Poincare placement; optional spatial magnitude). This commit is the first, smallest, testable layer. 12 tests, all green. https://claude.ai/code/session_01HbqooFZHAjaUtFEzhA1R2u
1 parent f373c75 commit 82595ed

2 files changed

Lines changed: 536 additions & 0 deletions

File tree

src/hpc/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ pub mod lapack;
3737
pub mod fft;
3838
pub mod vml;
3939
pub mod packed;
40+
// PhiSpiral256 — golden-spiral leaf-location codec (orthogonal location lane,
41+
// sibling to CAM_PQ meaning / PolarQuant magnitude).
42+
pub mod phi_spiral;
4043

4144
// Cognitive layer types (migrated from rustynum-core)
4245
#[allow(missing_docs)]

0 commit comments

Comments
 (0)