pub struct ExperienceStorage { /* private fields */ }Expand description
Experience storage for meta-learning
Implementations§
Source§impl ExperienceStorage
impl ExperienceStorage
Sourcepub fn add_experience(&mut self, experience: Experience)
pub fn add_experience(&mut self, experience: Experience)
Add an experience to the storage
Sourcepub fn get_task_experiences(&self, task_id: &str) -> Vec<&Experience>
pub fn get_task_experiences(&self, task_id: &str) -> Vec<&Experience>
Get experiences for a specific task
Sourcepub fn get_all_experiences(&self) -> Vec<&Experience>
pub fn get_all_experiences(&self) -> Vec<&Experience>
Get all experiences
Sourcepub fn get_similar_experiences(
&self,
features: &ArrayView2<'_, f64>,
k: usize,
) -> Vec<&Experience>
pub fn get_similar_experiences( &self, features: &ArrayView2<'_, f64>, k: usize, ) -> Vec<&Experience>
Get the most similar experiences based on feature similarity
Trait Implementations§
Source§impl Clone for ExperienceStorage
impl Clone for ExperienceStorage
Source§fn clone(&self) -> ExperienceStorage
fn clone(&self) -> ExperienceStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExperienceStorage
impl RefUnwindSafe for ExperienceStorage
impl Send for ExperienceStorage
impl Sync for ExperienceStorage
impl Unpin for ExperienceStorage
impl UnwindSafe for ExperienceStorage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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