Struct totsu_core::MatOp
source · pub struct MatOp<'a, L: LinAlgEx> { /* private fields */ }
Expand description
Matrix operator
Matrix struct which borrows a slice of data array and implements Operator
.
Implementations§
source§impl<'a, L: LinAlgEx> MatOp<'a, L>
impl<'a, L: LinAlgEx> MatOp<'a, L>
sourcepub fn new(typ: MatType, array: &'a [L::F]) -> Self
pub fn new(typ: MatType, array: &'a [L::F]) -> Self
Creates an instance
Returns MatOp
instance.
typ
: Matrix type and size.array
: data array slice. Column-major matrix data shall be stored ifMatType::General
. Symmetric packed form (the upper-triangular part in column-wise) of matrix data shall be stored ifMatType::SymPack
.
Trait Implementations§
source§impl<'a, L: LinAlgEx> Operator<L> for MatOp<'a, L>
impl<'a, L: LinAlgEx> Operator<L> for MatOp<'a, L>
source§fn op(&self, alpha: L::F, x: &L::Sl, beta: L::F, y: &mut L::Sl)
fn op(&self, alpha: L::F, x: &L::Sl, beta: L::F, y: &mut L::Sl)
Calculate \(\alpha K x + \beta y\). Read more
source§fn trans_op(&self, alpha: L::F, x: &L::Sl, beta: L::F, y: &mut L::Sl)
fn trans_op(&self, alpha: L::F, x: &L::Sl, beta: L::F, y: &mut L::Sl)
Calculate \(\alpha K^T x + \beta y\). Read more
source§fn absadd_cols(&self, tau: &mut L::Sl)
fn absadd_cols(&self, tau: &mut L::Sl)
Calculate \(\left[ \tau_j + \sum_{i=0}^{m-1}|K_{ij}| \right]_{j=0,…,n-1}\). Read more
source§fn absadd_rows(&self, sigma: &mut L::Sl)
fn absadd_rows(&self, sigma: &mut L::Sl)
Calculate \(\left[ \sigma_i + \sum_{j=0}^{n-1}|K_{ij}| \right]_{i=0,…,m-1}\). Read more