pub struct CoAccessMatrix { /* private fields */ }Expand description
Tracks co-access patterns between files (Hebbian learning).
Implementations§
Source§impl CoAccessMatrix
impl CoAccessMatrix
pub fn new() -> Self
Sourcepub fn record_access(&mut self, path_hash: u64)
pub fn record_access(&mut self, path_hash: u64)
Record a file access. If within the burst window (500ms), strengthens associations with other files in the same burst.
Sourcepub fn association_strength(&self, path_hash: u64, active_hashes: &[u64]) -> f32
pub fn association_strength(&self, path_hash: u64, active_hashes: &[u64]) -> f32
Get the association strength of a file with all currently active files. Applies exponential decay based on elapsed time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoAccessMatrix
impl RefUnwindSafe for CoAccessMatrix
impl Send for CoAccessMatrix
impl Sync for CoAccessMatrix
impl Unpin for CoAccessMatrix
impl UnsafeUnpin for CoAccessMatrix
impl UnwindSafe for CoAccessMatrix
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