Files
khipu/00_unanchay/khipu/khipu-gravity/README.md
T
sergio bf782ebef1 feat: khipu standalone — notas P2P soberanas content-addressed, local-first (front-door, git-dep al monorepo)
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>
2026-06-04 12:18:02 +00:00

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

  • libm for exp (no std::math when compiled to WASM)
  • Zero I/O or time deps (caller passes dt)