LongTermStore

Struct LongTermStore 

Source
pub struct LongTermStore { /* private fields */ }
Expand description

Long-term consolidated memory store

Implementations§

Source§

impl LongTermStore

Source

pub fn new(config: LongTermConfig) -> Self

Create new long-term store

Source

pub fn integrate(&self, temporal_pattern: TemporalPattern)

Integrate pattern from consolidation (optimized with deferred sorting)

Source

pub fn integrate_batch(&self, patterns: Vec<TemporalPattern>)

Batch integrate multiple patterns (optimized - single sort at end)

Source

pub fn get(&self, id: &PatternId) -> Option<TemporalPattern>

Get pattern by ID

Source

pub fn update(&self, temporal_pattern: TemporalPattern) -> bool

Update pattern

Source

pub fn search(&self, query: &Query) -> Vec<SearchResult>

Search by embedding similarity (SIMD-accelerated with early exit)

Source

pub fn search_with_time_range( &self, query: &Query, time_range: TimeRange, ) -> Vec<SearchResult>

Search with time range filter (SIMD-accelerated)

Source

pub fn filter_by_time(&self, time_range: TimeRange) -> Vec<TemporalPattern>

Filter patterns by time range (ensures index is sorted first)

Source

pub fn decay_low_salience(&self, decay_rate: f32)

Strategic forgetting: decay low-salience patterns

Source

pub fn remove(&self, id: &PatternId) -> Option<TemporalPattern>

Remove pattern

Source

pub fn len(&self) -> usize

Get total number of patterns

Source

pub fn is_empty(&self) -> bool

Check if empty

Source

pub fn clear(&self)

Clear all patterns

Source

pub fn all(&self) -> Vec<TemporalPattern>

Get all patterns

Source

pub fn stats(&self) -> LongTermStats

Get statistics

Trait Implementations§

Source§

impl Default for LongTermStore

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.