hybrid_phi

Crates.iohybrid_phi
lib.rshybrid_phi
version1.0.0
created_at2025-05-04 15:34:06.891292+00
updated_at2025-05-05 00:05:59.951406+00
descriptionHigh-accuracy φ-based hybrid approximation method
homepage
repositoryhttps://github.com/andysay1/hybrid_phi
max_upload_size
id1659719
size69,456
(andysay1)

documentation

README

hybrid_phi

High-precision φ-based approximation and memory routing for signal processing, AI, and embedded systems.

hybrid_phi is a modular Rust library that provides accurate φ-based encoding, reversible approximation, quantized memory storage, routing, and exportable memory bundles.


✨ Features

  • Reversible φ-based approximation with sub-ε precision
  • Quantized signal memory with optional metadata
  • Similarity-based routing
  • Self-contained bundles (.json import/export)
  • CLI examples (phi_app.rs) for encoding, routing, listing, and more
  • No-alloc friendly core, minimal dependencies

📦 Installation

In your Cargo.toml:

[dependencies]
hybrid_phi = "1.0.0"

🔧 Basic Usage

use hybrid_phi::hybrid_phi_approximate;

let x = 123.456;
let approx = hybrid_phi_approximate(x, 10);

For inverse:

use hybrid_phi::hybrid_phi_inverse;

let recovered = hybrid_phi_inverse(approx, 10);

🧠 Signal Memory + Routing

Store and route signals:

use hybrid_phi::phi_fs::PhiMemoryStore;
use hybrid_phi::phi_router::phi_route;

let store = PhiMemoryStore::new(".phi_store");
store.save("pattern1", &[1.0, 2.0, 3.0])?;

let route = phi_route(&[1.0, 2.0, 3.0], &store, 0.9);

📤 Bundles and Export

use hybrid_phi::phi_bundle::PhiBundle;

let bundle = PhiBundle::from_store("signal", &store)?;
bundle.save_json("signal.json")?;

let loaded = PhiBundle::load_json("signal.json")?;
loaded.save_to_store(&store)?;

🚀 CLI Examples

Run from examples:

cargo run --example phi_app encode my_signal
cargo run --example phi_app route --input=1.0,2.0,3.0 --threshold=0.9
cargo run --example phi_app export my_signal --to=my_signal.json

📚 Documentation

Autogenerated API docs:

cargo doc --open

📅 Version

Current: 1.0.0
Generated: 2025-05-05T00:02:30.184504 UTC


🔐 License

Licensed under MIT.
For commercial licensing, contact: info@paxintrade.com


© 2025 Idan Kaminer — Creator and maintainer

Commit count: 9

cargo fmt