The Rust port lived two directories deep (rust-port/wifi-densepose-rs/) without any sibling under rust-port/ that warranted the extra level. Move the whole workspace up to v2/ to match v1/ (Python) at the same depth and shorten every cd / build command across the repo. git mv preserves history for all tracked files. 60 files updated for path references (CI workflows, ADRs, docs, scripts, READMEs, internal .claude-flow state). Two manual fixes for relative-cd paths in CLAUDE.md and ADR-043 that became wrong after the depth change (cd ../.. → cd ..). Validated: - cargo check --workspace --no-default-features → clean (after target/ nuke; the gitignored target/ was carried by the OS rename and had hard-coded old paths in build scripts) - cargo test --workspace --no-default-features → 1,539 passed, 0 failed, 8 ignored (same totals as pre-rename) - ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm) After-merge follow-up: contributors should `rm -rf v2/target` once and let cargo regenerate from the new path. |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
ruv-neural-mincut
Dynamic minimum cut analysis for brain network topology detection.
Overview
ruv-neural-mincut provides algorithms for computing minimum cuts on brain
connectivity graphs, tracking topology changes over time, and detecting neural
coherence events such as network formation, dissolution, merger, and split.
These algorithms form the core of the rUv Neural cognitive state detection
pipeline, identifying when brain network topology undergoes significant
structural transitions.
Features
- Stoer-Wagner (
stoer_wagner): Global minimum cut in O(V^3) time, returning cut value, partitions, and cut edges - Normalized cut (
normalized): Shi-Malik spectral bisection via the Fiedler vector for balanced graph partitioning - Multiway cut (
multiway): Recursive normalized cut for k-module detection;detect_modulesfor automatic module count selection - Spectral cut (
spectral_cut): Cheeger constant computation, spectral bisection, and Cheeger bound estimation - Dynamic tracking (
dynamic):DynamicMincutTrackerfor temporal mincut evolution tracking withTopologyTransitionandTransitionDirectiondetection - Coherence detection (
coherence):CoherenceDetectoridentifyingCoherenceEventTypeevents (formation, dissolution, merger, split) from temporal graph sequences - Benchmarks (
benchmark): Performance benchmarking utilities
Usage
use ruv_neural_mincut::{
stoer_wagner_mincut, normalized_cut, spectral_bisection,
cheeger_constant, multiway_cut, detect_modules,
DynamicMincutTracker, CoherenceDetector,
};
use ruv_neural_core::graph::BrainGraph;
// Compute global minimum cut
let result = stoer_wagner_mincut(&graph);
println!("Cut value: {:.3}", result.cut_value);
println!("Partition A: {:?}", result.partition_a);
println!("Partition B: {:?}", result.partition_b);
// Normalized cut (spectral bisection)
let ncut = normalized_cut(&graph);
// Spectral analysis
let (partition, cheeger) = spectral_bisection(&graph);
let h = cheeger_constant(&graph);
// Multiway cut for k modules
let multi = multiway_cut(&graph, 4);
let auto_modules = detect_modules(&graph);
// Track topology transitions over time
let mut tracker = DynamicMincutTracker::new();
for graph in &graph_sequence.graphs {
let result = tracker.update(graph).unwrap();
}
// Detect coherence events
let mut detector = CoherenceDetector::new();
for graph in &graph_sequence.graphs {
if let Some(event) = detector.check(graph) {
println!("Event: {:?} at t={}", event.event_type, event.timestamp);
}
}
API Reference
| Module | Key Types / Functions |
|---|---|
stoer_wagner |
stoer_wagner_mincut |
normalized |
normalized_cut |
multiway |
multiway_cut, detect_modules |
spectral_cut |
spectral_bisection, cheeger_constant, cheeger_bound |
dynamic |
DynamicMincutTracker, TopologyTransition, TransitionDirection |
coherence |
CoherenceDetector, CoherenceEvent, CoherenceEventType |
benchmark |
Benchmark utilities |
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
Yes | Standard library support |
wasm |
No | WASM-compatible implementations |
sublinear |
No | Sublinear mincut algorithms |
Integration
Depends on ruv-neural-core for BrainGraph, MincutResult, and MultiPartition
types. Receives graphs from ruv-neural-graph. Mincut results feed into
ruv-neural-embed for topology-aware embeddings and ruv-neural-decoder
for cognitive state classification.
License
MIT OR Apache-2.0