[][src]Struct rust2vec::storage::NdArray

pub struct NdArray(pub Array2<f32>);

In-memory ndarray matrix.

Trait Implementations

impl Storage for NdArray[src]

impl StorageView for NdArray[src]

impl From<NdArray> for StorageWrap[src]

impl From<NdArray> for StorageViewWrap[src]

impl Debug for NdArray[src]

Auto Trait Implementations

impl Send for NdArray

impl Sync for NdArray

Blanket Implementations

impl<S> Quantize for S where
    S: StorageView
[src]

fn quantize_using<T, R>(
    &Self,
    usize,
    u32,
    usize,
    usize,
    bool,
    &mut R
) -> QuantizedArray where
    R: Rng,
    T: TrainPQ<f32>, 
[src]

Quantize the embedding matrix.

This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.

fn quantize<T>(
    &self,
    n_subquantizers: usize,
    n_subquantizer_bits: u32,
    n_iterations: usize,
    n_attempts: usize,
    normalize: bool
) -> QuantizedArray where
    T: TrainPQ<f32>, 
[src]

Quantize the embedding matrix. Read more

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]