code wiki / _hdl_build / nx_power_iter.nx
nx_power_iter.nx
buildroot/runtime/_hdl_build/nx_power_iter.nx
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
imports: nx_syscalls.nx
imported by: nx_power_iter_test.nx
structs
| none |
consts
| 11 | const PI_SCALE: i64 = 1000 // fixed-point scale for the eigenvector (inf-norm normalized to 1000) |
functions
| 14 | func pi_matvec(M: *i64, v: *i64, nn: i64, out: *i64) -> i64 |
| 26 | func pi_absmax(v: *i64, nn: i64) -> i64 |
| 33 | func pi_iterate(M: *i64, nn: i64, K: i64, out: *i64) -> i64 |
| 51 | func pi_eigenvalue_milli(M: *i64, v: *i64, nn: i64) -> i64 |
| 61 | func pi_ratio_milli(v: *i64, a: i64, b: i64) -> i64 called by 1: main |