pub trait Caching {
// Required methods
fn init(&mut self) -> Index;
fn root_index(&mut self) -> Index;
fn root(&self) -> Option<&CacheEntry>;
fn insert(&mut self, key: &[usize]) -> Index;
fn node(&self, key: &CacheKey) -> Option<&CacheEntry>;
fn contains(&self, key: &CacheKey) -> bool;
fn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>;
fn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>;
fn size(&self) -> usize;
fn is_empty(&self) -> bool;
}Expand description
A cache of subproblems keyed by sorted itemsets.
Required Methods§
Sourcefn root_index(&mut self) -> Index
fn root_index(&mut self) -> Index
Index of the root entry.
Sourcefn root(&self) -> Option<&CacheEntry>
fn root(&self) -> Option<&CacheEntry>
The root entry.
Sourcefn insert(&mut self, key: &[usize]) -> Index
fn insert(&mut self, key: &[usize]) -> Index
Finds the entry of the sorted itemset key, creating it if needed.
The index is New for an entry that has not been evaluated yet.
Sourcefn node(&self, key: &CacheKey) -> Option<&CacheEntry>
fn node(&self, key: &CacheKey) -> Option<&CacheEntry>
The entry for key.
Sourcefn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>
fn update_root(&mut self) -> Option<CacheEntryUpdater<'_>>
An updater for the root entry.
Sourcefn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>
fn update_node(&mut self, key: &CacheKey) -> Option<CacheEntryUpdater<'_>>
An updater for the entry of key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".