pub struct CaseMemory { /* private fields */ }Expand description
Data structure representing case memory.
Implementations§
Source§impl CaseMemory
impl CaseMemory
Sourcepub fn add(&mut self, traj: &Trajectory)
pub fn add(&mut self, traj: &Trajectory)
Performs add for this type.
Sourcepub fn retrieve(&self, _query: &str, k: usize) -> Vec<Case>
pub fn retrieve(&self, _query: &str, k: usize) -> Vec<Case>
Prioritized sample without replacement. query reserved for future goal filtering.
Sourcepub fn retrieve_with_is_weights(
&mut self,
query: &str,
k: usize,
) -> (Vec<Case>, Vec<f64>)
pub fn retrieve_with_is_weights( &mut self, query: &str, k: usize, ) -> (Vec<Case>, Vec<f64>)
Same as retrieve, but decays priorities of sampled cases (in-place) and
returns approximate importance-sampling weights w_i ∝ 1 / (N * P(i)).
Sourcepub fn sample_counter(&self) -> u32
pub fn sample_counter(&self) -> u32
Performs sample counter for this type.
Trait Implementations§
Source§impl Debug for CaseMemory
impl Debug for CaseMemory
Auto Trait Implementations§
impl !Freeze for CaseMemory
impl !RefUnwindSafe for CaseMemory
impl !Sync for CaseMemory
impl Forget for CaseMemory
impl Move for CaseMemory
impl Send for CaseMemory
impl Unpin for CaseMemory
impl UnsafeUnpin for CaseMemory
impl UnwindSafe for CaseMemory
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