LinOp

Trait LinOp 

Source
pub trait LinOp<T: ComplexField>: Sync + Debug {
    // Required methods
    fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq;
    fn nrows(&self) -> usize;
    fn ncols(&self) -> usize;
    fn apply(
        &self,
        out: MatMut<'_, T>,
        rhs: MatRef<'_, T>,
        par: Par,
        stack: &mut MemStack,
    );
    fn conj_apply(
        &self,
        out: MatMut<'_, T>,
        rhs: MatRef<'_, T>,
        par: Par,
        stack: &mut MemStack,
    );
}
Expand description

linear operator from a finite-dimensional vector space

Required Methods§

Source

fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq

computes the workspace layout required to apply self or the conjugate o self to a matrix with rhs_ncols columns

Source

fn nrows(&self) -> usize

output dimension of the operator

Source

fn ncols(&self) -> usize

input dimension of the operator

Source

fn apply( &self, out: MatMut<'_, T>, rhs: MatRef<'_, T>, par: Par, stack: &mut MemStack, )

applies self to rhs, and stores the result in out

Source

fn conj_apply( &self, out: MatMut<'_, T>, rhs: MatRef<'_, T>, par: Par, stack: &mut MemStack, )

applies the conjugate of self to rhs, and stores the result in out

Implementations on Foreign Types§

Source§

impl<T: ComplexField, M: Sized + LinOp<T>> LinOp<T> for &M

Source§

fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq

Source§

fn nrows(&self) -> usize

Source§

fn ncols(&self) -> usize

Source§

fn apply( &self, out: MatMut<'_, T>, rhs: MatRef<'_, T>, par: Par, stack: &mut MemStack, )

Source§

fn conj_apply( &self, out: MatMut<'_, T>, rhs: MatRef<'_, T>, par: Par, stack: &mut MemStack, )

Implementors§

Source§

impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseColMat<I, ViewT>

Source§

impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseColMatMut<'_, I, ViewT>

Source§

impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMat<I, ViewT>

Source§

impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatMut<'_, I, ViewT>

Source§

impl<T: ComplexField> LinOp<T> for IdentityPrecond

Source§

impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseColMatRef<'_, I, ViewT>

Source§

impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatRef<'_, I, ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for Diag<ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for DiagMut<'_, ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for DiagRef<'_, ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for Mat<ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for MatMut<'_, ViewT>

Source§

impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for MatRef<'_, ViewT>