code wiki / (root) / nx_pagerank.nx

nx_pagerank.nx

buildroot/runtime/nx_pagerank.nx

2839 B57 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind librarytopic pagerank
docsdependenciesstructsconstsfunctions

about

nx_pagerank.nx -- LIB: sovereign PageRank over a web-graph edge list. The authority signal weak indie indexes (Mojeek/Brave) lack -- Common Crawl's WAT links are a 13.4B-edge graph; this is what turns "a bigger index" into "a BETTER index" (link-authority ranking + anti-slop). Power iteration, damping 0.85, integer fixed-point (ranks are parts-per-PR_SCALE, conserved to ~PR_SCALE), dangling-node redistribution (standard formulation). Fuses as an authority prior into nx_rank_fused. BUILT + gated NOW on synthetic graphs with known ranks; RUNS at NAS scale over the real CC web graph later (build-now / run-on-NAS, per the foundational roadmap). No float (nx is integer). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_pagerank.nx nx_pagerank_build.nx nx_pagerank_gate.nx

imports: nx_syscalls.nx

imported by: nx_pagerank_build.nxnx_pagerank_gate.nx

structs

none

consts

10const PR_SCALE: i64 = 1000000000 // ranks are ppb, sum ~= PR_SCALE
11const PR_D_NUM: i64 = 85 // damping 0.85 = 85/100
12const PR_D_DEN: i64 = 100

functions

16func pr_compute(N: i64, M: i64, efrom: *i64, eto: *i64, rank: *i64, iters: i64) -> i64
called by 2: pb_runmain calls 1: sys_mmap
51func pr_argmax(rank: *i64, N: i64) -> i64
called by 1: main
57func pr_sum(rank: *i64, N: i64) -> i64 { var s: i64 = 0; var i: i64 = 0; while i < N { s = s + rank[i]; i = i + 1 } return s }
called by 1: main