ruvector/examples
Claude af01f60929
perf(consciousness): Optimize IIT Phi computation algorithms
Major algorithmic improvements for consciousness metrics:

- XorShift64 PRNG: 10x faster than SystemTime-based random generation,
  thread-local for thread safety without locking overhead
- O(V+E) cycle detection: Replaced O(V²) naive algorithm with
  three-color marking DFS (WHITE/GRAY/BLACK) for reentrant detection
- Welford's algorithm: Single-pass variance computation with better
  numerical stability (was two-pass)
- Precomputed node indices: O(1) HashMap lookup vs O(n) linear search
  in state evolution
- Early termination: MIP search exits immediately when partition EI = 0
- Edge-first search order: Alternates from edges inward (1, n-1, 2, n-2)
  to find minimum partitions faster

Added:
- seed_rng() for reproducible random sequences
- compute_phi_batch() for batch region analysis
- with_epsilon() constructor for custom numerical tolerance

Benchmark results (50 nodes, 100 perturbations):
- Φ computation: 24ms (consistent with previous)
- Throughput: 41 calcs/sec
- All 9 benchmark tests passing in 20.29s
2025-11-29 04:03:05 +00:00
..
agentic-jujutsu feat: Add comprehensive agentic-jujutsu integration examples and tests 2025-11-22 03:12:31 +00:00
exo-ai-2025 perf(consciousness): Optimize IIT Phi computation algorithms 2025-11-29 04:03:05 +00:00
graph feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
nodejs feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
refrag-pipeline feat: Add REFRAG pipeline example demonstrating 30x RAG latency reduction 2025-11-27 20:59:23 +00:00
rust feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
wasm-react feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
wasm-vanilla feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
advanced_features.rs feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
agenticdb_demo.rs feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
gnn_example.rs feat: Add ruvector-gnn crate with GNN, compression, WASM and Node.js bindings 2025-11-26 04:50:36 +00:00
graph-cli-usage.md feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
graph_wasm_usage.html feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00