pub struct WindowCache {
pub key_projections: Vec<Vec<f32>>,
pub sorted_indices: Vec<Vec<usize>>,
pub sorted_values: Vec<Vec<f32>>,
pub histograms: Option<Vec<Vec<f32>>>,
pub cdfs: Option<Vec<Vec<f32>>>,
pub num_keys: usize,
}Expand description
Per-window cache containing sorted projections
Fields§
§key_projections: Vec<Vec<f32>>Projected keys [num_keys × P]
sorted_indices: Vec<Vec<usize>>Sorted indices per projection [P × num_keys]
sorted_values: Vec<Vec<f32>>Sorted values per projection [P × num_keys]
histograms: Option<Vec<Vec<f32>>>Histogram bins per projection [P × num_bins]
cdfs: Option<Vec<Vec<f32>>>CDF per projection [P × num_bins]
num_keys: usizeNumber of keys in window
Implementations§
Source§impl WindowCache
impl WindowCache
Sourcepub fn build(keys: &[&[f32]], proj_cache: &ProjectionCache) -> Self
pub fn build(keys: &[&[f32]], proj_cache: &ProjectionCache) -> Self
Build cache from keys using projection cache
Sourcepub fn build_histograms(&mut self, num_bins: usize)
pub fn build_histograms(&mut self, num_bins: usize)
Build histograms for ultra-fast CDF comparison
Sourcepub fn get_sorted(&self, projection_idx: usize) -> &[f32]
pub fn get_sorted(&self, projection_idx: usize) -> &[f32]
Get sorted values for a projection
Trait Implementations§
Source§impl Clone for WindowCache
impl Clone for WindowCache
Source§fn clone(&self) -> WindowCache
fn clone(&self) -> WindowCache
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 WindowCache
impl RefUnwindSafe for WindowCache
impl Send for WindowCache
impl Sync for WindowCache
impl Unpin for WindowCache
impl UnwindSafe for WindowCache
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