mnemosyne-graph-core 0.1.0

Shared graph kernels for the Mnemosyne memory substrate: force-directed simulation, R-tree viewport index, and the SIMD primitives both the native PyO3 crate and the WASM sub-crate depend on.
Documentation
//! Shared graph kernels for Mnemosyne.
//!
//! This crate is reusable between the native PyO3 crate
//! (`mnemosyne_rs`) and the forthcoming `graph_wasm` sub-crate
//! (Wave 2 of Phase 223). It contains:
//!
//! * [`util`] — runtime-dispatched AVX2+FMA dot products. Moved
//!   here from `mnemosyne_rs::util` so both surfaces can share one
//!   SIMD implementation.
//! * [`force`] — Barnes-Hut 2D force simulation (`Simulation`,
//!   `SimulationConfig`).
//! * [`viewport`] — R-tree viewport spatial index with lazy
//!   incremental updates (`ViewportIndex`, `IndexPoint`, `ScoreKey`).
//!
//! ## Features
//!
//! * `native` (default) — enables rayon. Intended for the host-side
//!   PyO3 crate and any integration tests that want parallelism.
//! * `wasm` — opts out of rayon and any other host-only deps. The
//!   WASM sub-crate sets `default-features = false, features = ["wasm"]`.
//!
//! Rayon is optional because the Wave 1 force simulation is single-
//! threaded (see the note in `force.rs`); the feature flag reserves
//! the parallel code path for when we need it.

pub mod force;
pub mod force_3d;
#[cfg(test)]
mod force_3d_tests;
pub mod util;
pub mod viewport;

pub use force::{Simulation, SimulationConfig};
pub use glam::{Vec2, Vec3};
pub use viewport::{IndexPoint, ScoreKey, ViewportIndex};