code wiki / _hdl_build / nx_power_iter.nx

nx_power_iter.nx

buildroot/runtime/_hdl_build/nx_power_iter.nx

2679 B64 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic power
docsdependenciesstructsconstsfunctions

about

nx_power_iter.nx -- the team's GENERAL integer power-iteration ability (the bits-up core of truncated SVD, the most-urgent MISSING gap the team's own gap-scan named, toward S-class semantic retrieval). Power iteration finds the DOMINANT eigenvector of a symmetric matrix: v <- M v, renormalized, repeats to the top eigen-direction; the eigenvalue is the inf-norm ratio. Integer fixed-point only (scale 1000), no floats -- so it runs anywhere the team deploys. This is a GENERAL ability: it reduces ANY matrix (e.g. the PPMI co-occurrence gram) to a dense embedding direction; the team applies it, Claude does not hand-solve instances. Triangulated against a float reference (numpy eig). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_power_iter.nx nx_power_iter_test.nx

imports: nx_syscalls.nx

imported by: nx_power_iter_test.nx

structs

none

consts

11const PI_SCALE: i64 = 1000 // fixed-point scale for the eigenvector (inf-norm normalized to 1000)

functions

14func pi_matvec(M: *i64, v: *i64, nn: i64, out: *i64) -> i64
26func pi_absmax(v: *i64, nn: i64) -> i64
33func pi_iterate(M: *i64, nn: i64, K: i64, out: *i64) -> i64
called by 1: main calls 3: sys_mmappi_matvecpi_absmax
51func pi_eigenvalue_milli(M: *i64, v: *i64, nn: i64) -> i64
called by 1: main calls 3: sys_mmappi_matvecpi_absmax
61func pi_ratio_milli(v: *i64, a: i64, b: i64) -> i64
called by 1: main