Trait SMat

Source
pub trait SMat<T: Float> {
    // Required methods
    fn nrows(&self) -> usize;
    fn ncols(&self) -> usize;
    fn nnz(&self) -> usize;
    fn svd_opa(&self, x: &[T], y: &mut [T], transposed: bool);
    fn compute_column_means(&self) -> Vec<T>;
    fn multiply_with_dense(
        &self,
        dense: &DMatrix<T>,
        result: &mut DMatrix<T>,
        transpose_self: bool,
    );
    fn multiply_with_dense_centered(
        &self,
        dense: &DMatrix<T>,
        result: &mut DMatrix<T>,
        transpose_self: bool,
        means: &DVector<T>,
    );
    fn multiply_transposed_by_dense(
        &self,
        q: &DMatrix<T>,
        result: &mut DMatrix<T>,
    );
    fn multiply_transposed_by_dense_centered(
        &self,
        q: &DMatrix<T>,
        result: &mut DMatrix<T>,
        means: &DVector<T>,
    );
}

Required Methods§

Source

fn nrows(&self) -> usize

Source

fn ncols(&self) -> usize

Source

fn nnz(&self) -> usize

Source

fn svd_opa(&self, x: &[T], y: &mut [T], transposed: bool)

Source

fn compute_column_means(&self) -> Vec<T>

Source

fn multiply_with_dense( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, )

Source

fn multiply_with_dense_centered( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, means: &DVector<T>, )

Source

fn multiply_transposed_by_dense(&self, q: &DMatrix<T>, result: &mut DMatrix<T>)

Source

fn multiply_transposed_by_dense_centered( &self, q: &DMatrix<T>, result: &mut DMatrix<T>, means: &DVector<T>, )

Implementations on Foreign Types§

Source§

impl<T: Float + Zero + AddAssign + Clone + Sync + Send + MulAssign> SMat<T> for CsrMatrix<T>

Source§

fn svd_opa(&self, x: &[T], y: &mut [T], transposed: bool)

takes an n-vector x and returns A*x in y

Source§

fn nrows(&self) -> usize

Source§

fn ncols(&self) -> usize

Source§

fn nnz(&self) -> usize

Source§

fn compute_column_means(&self) -> Vec<T>

Source§

fn multiply_with_dense( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, )

Source§

fn multiply_with_dense_centered( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, means: &DVector<T>, )

Source§

fn multiply_transposed_by_dense(&self, q: &DMatrix<T>, result: &mut DMatrix<T>)

Source§

fn multiply_transposed_by_dense_centered( &self, q: &DMatrix<T>, result: &mut DMatrix<T>, means: &DVector<T>, )

Source§

impl<T: Float + Zero + AddAssign + Clone + Sync> SMat<T> for CooMatrix<T>

Source§

fn svd_opa(&self, x: &[T], y: &mut [T], transposed: bool)

takes an n-vector x and returns A*x in y

Source§

fn nrows(&self) -> usize

Source§

fn ncols(&self) -> usize

Source§

fn nnz(&self) -> usize

Source§

fn compute_column_means(&self) -> Vec<T>

Source§

fn multiply_with_dense( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, )

Source§

fn multiply_with_dense_centered( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, means: &DVector<T>, )

Source§

fn multiply_transposed_by_dense(&self, q: &DMatrix<T>, result: &mut DMatrix<T>)

Source§

fn multiply_transposed_by_dense_centered( &self, q: &DMatrix<T>, result: &mut DMatrix<T>, means: &DVector<T>, )

Source§

impl<T: Float + Zero + AddAssign + Clone + Sync> SMat<T> for CscMatrix<T>

Source§

fn svd_opa(&self, x: &[T], y: &mut [T], transposed: bool)

takes an n-vector x and returns A*x in y

Source§

fn nrows(&self) -> usize

Source§

fn ncols(&self) -> usize

Source§

fn nnz(&self) -> usize

Source§

fn compute_column_means(&self) -> Vec<T>

Source§

fn multiply_with_dense( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, )

Source§

fn multiply_with_dense_centered( &self, dense: &DMatrix<T>, result: &mut DMatrix<T>, transpose_self: bool, means: &DVector<T>, )

Source§

fn multiply_transposed_by_dense(&self, q: &DMatrix<T>, result: &mut DMatrix<T>)

Source§

fn multiply_transposed_by_dense_centered( &self, q: &DMatrix<T>, result: &mut DMatrix<T>, means: &DVector<T>, )

Implementors§

Source§

impl<T: Float + AddAssign + Sync + Send + MulAssign + Debug + 'static + Sum + SubAssign + FromPrimitive> SMat<T> for MaskedCSRMatrix<'_, T>