bf782ebef1
Front-door limpio: solo crates del dominio; Llimphi y lo fundacional por git-dep del monorepo gioser.git. cargo check pasa (5 crates, 0 errores). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
723 B
723 B
khipu-gravity
Mass/decay algorithm for khipu.
Pure physics of notes. Each note has mass: f32. Every tick (configurable, default 1h) mass decays: mass *= exp(-dt / half_life). Each access reinforces it: mass += boost. When mass < threshold, the note falls off the visible horizon (not deleted, kept in archive). Pure computation — doesn't touch the store; the caller decides what to do with the result.
API
use khipu_gravity::{Gravity, Params};
let g = Gravity::new(Params::default());
let new_mass = g.decay(mass, dt);
let new_mass = g.reinforce(mass, boost);
Deps
libmforexp(nostd::mathwhen compiled to WASM)- Zero I/O or time deps (caller passes
dt)