What if you could compress, store, and route signals — all with a compact reversible method, without using neural networks or heavy AI models?
Welcome to hybrid_phi: a Rust-powered library that encodes numbers using a unique ϕ-basis, stores them as memory entries, and routes signals based on similarity.
✨ What is hybrid_phi?
hybrid_phi is a Rust library for signal-aware memory, based on a mathematical approximation method using a weighted exponential sum (we call it the ϕ-basis).
It allows you to:
Encode any real number via hybrid_phi_approximate
Decode it losslessly via hybrid_phi_inverse
Quantize and store sequences using PhiMemoryStore
Match similar signals using phi_route
Export/import bundles as JSON
🚀 Quick Example
`use hybrid_phi::{hybrid_phi_approximate, hybrid_phi_inverse};
let w = 123.456;
let approx = hybrid_phi_approximate(w, 10);
let recovered = hybrid_phi_inverse(approx, 10);
println!("original = {w}, approx = {approx}, recovered = {recovered}");`
For storing and routing:
`use hybrid_phi::phi_fs::PhiMemoryStore;
use hybrid_phi::phi_router::phi_route;
let store = PhiMemoryStore::new(".phi_store");
store.save("signal", &[approx])?;
let match_result = phi_route(&[approx], &store, 0.9);`
🧵 What Makes It Special?
✔ Reversible approximation with machine precision
✔ No dependencies on ML models
✔ Compact, embedded-friendly signal memory
✔ Simple CLI for encode, route, describe, export, import
✔ JSON-compatible bundles
✔ Ready for AI/Edge
🎓 Use Cases
🤖 AI agents with structured memory
🚀 Embedded signal routing
🔬 Neuroscience-inspired models
🏘 GitHub and Crate
GitHub: github.com/andysay1/hybrid_phi
crates.io: hybrid_phi
Licensed under MIT. Commercial licensing: [email protected]
If you're curious about signal memory without neural nets, and want a compact way to encode and match values with precision — try hybrid_phi!
Rust-powered. Form-based. Future-facing.