pub struct CoverMap { /* private fields */ }Expand description
A Caching implementation keyed by the depth and the instances of a
subproblem: paths reaching the same instances at the same depth share one
entry.
Entries live in an arena, found by depth, then number of instances, then instances. Each entry keeps its instances, one word per 64 rows, so the memory grows with the size of the dataset.
Trait Implementations§
Source§impl Caching for CoverMap
impl Caching for CoverMap
Source§fn root_index(&mut self) -> Index
fn root_index(&mut self) -> Index
Index of the root entry.
Source§fn root(&self) -> Option<&CacheEntry>
fn root(&self) -> Option<&CacheEntry>
The root entry.
Source§fn insert(&mut self, path: &[usize], cover: &Cover) -> Index
fn insert(&mut self, path: &[usize], cover: &Cover) -> Index
Finds the entry of the subproblem, creating it if needed. The index is
New for an entry that has not been evaluated yet.Source§fn find(&self, path: &[usize], cover: &Cover) -> Option<&CacheEntry>
fn find(&self, path: &[usize], cover: &Cover) -> Option<&CacheEntry>
The entry of the subproblem, if cached.
Source§fn keyed_by_cover(&self) -> bool
fn keyed_by_cover(&self) -> bool
Whether lookups use
cover.Source§fn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>
fn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>
An updater for the root entry.
Source§fn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>
fn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>
An updater for the entry of
key.Auto Trait Implementations§
impl Freeze for CoverMap
impl RefUnwindSafe for CoverMap
impl Send for CoverMap
impl Sync for CoverMap
impl Unpin for CoverMap
impl UnsafeUnpin for CoverMap
impl UnwindSafe for CoverMap
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