pub struct NativeDiscoveryEngine { /* private fields */ }Expand description
The main RuVector-native discovery engine
This engine uses RuVector’s core algorithms:
- Vector similarity via HNSW index
- Graph coherence via Stoer-Wagner min-cut
- Temporal windowing for streaming analysis
Implementations§
Source§impl NativeDiscoveryEngine
impl NativeDiscoveryEngine
Sourcepub fn new(config: NativeEngineConfig) -> Self
pub fn new(config: NativeEngineConfig) -> Self
Create a new engine with the given configuration
Sourcepub fn add_vector(&mut self, vector: SemanticVector) -> u32
pub fn add_vector(&mut self, vector: SemanticVector) -> u32
Add a vector to the engine In production, this would use ruvector-core’s vector storage
Sourcepub fn add_correlation_edge(
&mut self,
source: u32,
target: u32,
correlation: f64,
)
pub fn add_correlation_edge( &mut self, source: u32, target: u32, correlation: f64, )
Add a correlation-based edge
Sourcepub fn compute_coherence(&self) -> CoherenceSnapshot
pub fn compute_coherence(&self) -> CoherenceSnapshot
Compute current coherence using Stoer-Wagner min-cut
The min-cut value represents the “weakest link” in the network. A drop in min-cut indicates the network is becoming fragmented.
Sourcepub fn detect_patterns(&mut self) -> Vec<DiscoveredPattern>
pub fn detect_patterns(&mut self) -> Vec<DiscoveredPattern>
Detect patterns by comparing current state to history
Sourcepub fn domain_coherence(&self, domain: Domain) -> Option<f64>
pub fn domain_coherence(&self, domain: Domain) -> Option<f64>
Get domain-specific coherence
Sourcepub fn stats(&self) -> EngineStats
pub fn stats(&self) -> EngineStats
Get statistics about the current state
Sourcepub fn get_patterns(&self) -> Vec<DiscoveredPattern>
pub fn get_patterns(&self) -> Vec<DiscoveredPattern>
Get all detected patterns from the latest detection run
Sourcepub fn export_graph(&self) -> GraphExport
pub fn export_graph(&self) -> GraphExport
Export the current graph structure
Sourcepub fn get_coherence_history(&self) -> Vec<CoherenceHistoryEntry>
pub fn get_coherence_history(&self) -> Vec<CoherenceHistoryEntry>
Get the coherence history
Auto Trait Implementations§
impl Freeze for NativeDiscoveryEngine
impl RefUnwindSafe for NativeDiscoveryEngine
impl Send for NativeDiscoveryEngine
impl Sync for NativeDiscoveryEngine
impl Unpin for NativeDiscoveryEngine
impl UnwindSafe for NativeDiscoveryEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more