Trait linfa_kernel::inner::Inner

source ·
pub trait Inner {
    type Elem: Float;

    // Required methods
    fn dot(&self, rhs: &ArrayView2<'_, Self::Elem>) -> Array2<Self::Elem>;
    fn sum(&self) -> Array1<Self::Elem>;
    fn size(&self) -> usize;
    fn column(&self, i: usize) -> Vec<Self::Elem>;
    fn to_upper_triangle(&self) -> Vec<Self::Elem>;
    fn is_dense(&self) -> bool;
    fn diagonal(&self) -> Array1<Self::Elem>;
}
Expand description

Specifies the methods an inner matrix of a kernel must be able to provide

Required Associated Types§

Required Methods§

source

fn dot(&self, rhs: &ArrayView2<'_, Self::Elem>) -> Array2<Self::Elem>

source

fn sum(&self) -> Array1<Self::Elem>

source

fn size(&self) -> usize

source

fn column(&self, i: usize) -> Vec<Self::Elem>

source

fn to_upper_triangle(&self) -> Vec<Self::Elem>

source

fn is_dense(&self) -> bool

source

fn diagonal(&self) -> Array1<Self::Elem>

Implementations on Foreign Types§

source§

impl<'a, F: Float> Inner for CsMatView<'a, F>

§

type Elem = F

source§

fn dot(&self, rhs: &ArrayView2<'_, F>) -> Array2<F>

source§

fn sum(&self) -> Array1<F>

source§

fn size(&self) -> usize

source§

fn column(&self, i: usize) -> Vec<F>

source§

fn to_upper_triangle(&self) -> Vec<F>

source§

fn diagonal(&self) -> Array1<F>

source§

fn is_dense(&self) -> bool

source§

impl<F: Float> Inner for CsMat<F>

§

type Elem = F

source§

fn dot(&self, rhs: &ArrayView2<'_, F>) -> Array2<F>

source§

fn sum(&self) -> Array1<F>

source§

fn size(&self) -> usize

source§

fn column(&self, i: usize) -> Vec<F>

source§

fn to_upper_triangle(&self) -> Vec<F>

source§

fn diagonal(&self) -> Array1<F>

source§

fn is_dense(&self) -> bool

source§

impl<F: Float, D: Data<Elem = F>> Inner for ArrayBase<D, Ix2>

§

type Elem = F

source§

fn dot(&self, rhs: &ArrayView2<'_, F>) -> Array2<F>

source§

fn sum(&self) -> Array1<F>

source§

fn size(&self) -> usize

source§

fn column(&self, i: usize) -> Vec<F>

source§

fn to_upper_triangle(&self) -> Vec<F>

source§

fn diagonal(&self) -> Array1<F>

source§

fn is_dense(&self) -> bool

Implementors§