pub struct CentroidCache {
pub centroids: Vec<Vec<f32>>,
pub weights: Vec<f32>,
pub assignments: Vec<usize>,
pub num_keys: usize,
}Expand description
Cached centroid information for a window
Fields§
§centroids: Vec<Vec<f32>>Centroid vectors [M × dim]
weights: Vec<f32>Weights for each centroid (sum to 1)
assignments: Vec<usize>Assignment of each key to centroid
num_keys: usizeNumber of keys
Implementations§
Trait Implementations§
Source§impl Clone for CentroidCache
impl Clone for CentroidCache
Source§fn clone(&self) -> CentroidCache
fn clone(&self) -> CentroidCache
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 CentroidCache
impl RefUnwindSafe for CentroidCache
impl Send for CentroidCache
impl Sync for CentroidCache
impl Unpin for CentroidCache
impl UnwindSafe for CentroidCache
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