Trait ndarray_linalg::operator::LinearOperator

source ·
pub trait LinearOperator {
    type Elem: Scalar;

    // Provided methods
    fn apply<S>(&self, a: &ArrayBase<S, Ix1>) -> Array1<S::Elem>
       where S: Data<Elem = Self::Elem> { ... }
    fn apply_mut<S>(&self, a: &mut ArrayBase<S, Ix1>)
       where S: DataMut<Elem = Self::Elem> { ... }
    fn apply_into<S>(&self, a: ArrayBase<S, Ix1>) -> ArrayBase<S, Ix1>
       where S: DataOwned<Elem = Self::Elem> + DataMut { ... }
    fn apply2<S>(&self, a: &ArrayBase<S, Ix2>) -> Array2<S::Elem>
       where S: Data<Elem = Self::Elem> { ... }
    fn apply2_mut<S>(&self, a: &mut ArrayBase<S, Ix2>)
       where S: DataMut<Elem = Self::Elem> { ... }
    fn apply2_into<S>(&self, a: ArrayBase<S, Ix2>) -> ArrayBase<S, Ix2>
       where S: DataOwned<Elem = Self::Elem> + DataMut { ... }
}
Expand description

Abstracted linear operator as an action to vector (ArrayBase<S, Ix1>) and matrix (ArrayBase<S, Ix2)

Required Associated Types§

Provided Methods§

source

fn apply<S>(&self, a: &ArrayBase<S, Ix1>) -> Array1<S::Elem>
where S: Data<Elem = Self::Elem>,

Apply operator out-place

source

fn apply_mut<S>(&self, a: &mut ArrayBase<S, Ix1>)
where S: DataMut<Elem = Self::Elem>,

Apply operator in-place

source

fn apply_into<S>(&self, a: ArrayBase<S, Ix1>) -> ArrayBase<S, Ix1>
where S: DataOwned<Elem = Self::Elem> + DataMut,

Apply operator with move

source

fn apply2<S>(&self, a: &ArrayBase<S, Ix2>) -> Array2<S::Elem>
where S: Data<Elem = Self::Elem>,

Apply operator to matrix out-place

source

fn apply2_mut<S>(&self, a: &mut ArrayBase<S, Ix2>)
where S: DataMut<Elem = Self::Elem>,

Apply operator to matrix in-place

source

fn apply2_into<S>(&self, a: ArrayBase<S, Ix2>) -> ArrayBase<S, Ix2>
where S: DataOwned<Elem = Self::Elem> + DataMut,

Apply operator to matrix with move

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A, Sa> LinearOperator for ArrayBase<Sa, Ix2>
where A: Scalar, Sa: Data<Elem = A>,

source§

type Elem = A

source§

fn apply<S>(&self, a: &ArrayBase<S, Ix1>) -> Array1<A>
where S: Data<Elem = A>,

Implementors§

source§

impl<A, Sa> LinearOperator for Diagonal<Sa>
where A: Scalar, Sa: Data<Elem = A>,

source§

type Elem = A