Skip to main content

SparseRowMat

Type Alias SparseRowMat 

Source
pub type SparseRowMat<I, T, Rows = usize, Cols = usize> = SparseRowMat<Own<I, T, Rows, Cols>>;
Expand description

owning sparse row major matrix

see SymbolicSparseRowMatRef

Aliased Type§

#[repr(transparent)]
pub struct SparseRowMat<I, T, Rows = usize, Cols = usize>(/* private fields */);

Implementations§

Source§

impl<Rows: Shape, Cols: Shape, I: Index, T> SparseRowMat<I, T, Rows, Cols>

Source

pub fn new(symbolic: SymbolicSparseRowMat<I, Rows, Cols>, val: Vec<T>) -> Self

see [SparseRowMatRef::new]

Source

pub fn parts(&self) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &[T])

see [SparseRowMatRef::parts]

Source

pub fn parts_mut( &mut self, ) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &mut [T])

see [SparseRowMatRef::parts]

Source

pub fn into_parts(self) -> (SymbolicSparseRowMat<I, Rows, Cols>, Vec<T>)

see [SparseRowMatRef::parts]

Source

pub fn symbolic(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>

see [SparseRowMatRef::symbolic]

Source

pub fn val(&self) -> &[T]

see [SparseRowMatRef::val]

Source

pub fn val_mut(&mut self) -> &mut [T]

see [SparseRowMatRef::val]

Source

pub fn val_of_row(&self, j: Idx<Rows>) -> &[T]

see [SparseRowMatRef::val_of_row]

Source

pub fn val_of_row_mut(&mut self, j: Idx<Rows>) -> &mut [T]

see [SparseRowMatRef::val_of_row]

Source

pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SparseRowMatRef<'_, I, T, V, H>

see [SparseRowMatRef::as_shape]

Source

pub fn as_shape_mut<V: Shape, H: Shape>( &mut self, nrows: V, ncols: H, ) -> SparseRowMatMut<'_, I, T, V, H>

see [SparseRowMatRef::as_shape]

Source

pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SparseRowMat<I, T, V, H>

see [SparseRowMatRef::as_shape]

Source

pub fn as_dyn(&self) -> SparseRowMatRef<'_, I, T>

see [SparseRowMatRef::as_dyn]

Source

pub fn as_dyn_mut(&mut self) -> SparseRowMatMut<'_, I, T>

see [SparseRowMatRef::as_dyn]

Source

pub fn into_dyn(self) -> SparseRowMat<I, T>

see [SparseRowMatRef::as_dyn]

Source

pub fn as_ref(&self) -> SparseRowMatRef<'_, I, T, Rows, Cols>

see [SparseRowMatRef::as_ref]

Source

pub fn transpose(&self) -> SparseColMatRef<'_, I, T, Cols, Rows>

see [SparseRowMatRef::transpose]

Source

pub fn transpose_mut(&mut self) -> SparseColMatMut<'_, I, T, Cols, Rows>

see [SparseRowMatRef::transpose]

Source

pub fn into_transpose(self) -> SparseColMat<I, T, Cols, Rows>

see [SparseRowMatRef::transpose]

Source

pub fn conjugate(&self) -> SparseRowMatRef<'_, I, T::Conj, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::conjugate]

Source

pub fn conjugate_mut(&mut self) -> SparseRowMatMut<'_, I, T::Conj, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::conjugate]

Source

pub fn into_conjugate(self) -> SparseRowMat<I, T::Conj, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::conjugate]

Source

pub fn adjoint(&self) -> SparseColMatRef<'_, I, T::Conj, Cols, Rows>
where T: Conjugate,

see [SparseRowMatRef::adjoint]

Source

pub fn adjoint_mut(&mut self) -> SparseColMatMut<'_, I, T::Conj, Cols, Rows>
where T: Conjugate,

see [SparseRowMatRef::adjoint]

Source

pub fn into_adjoint(self) -> SparseColMat<I, T::Conj, Cols, Rows>
where T: Conjugate,

see [SparseRowMatRef::adjoint]

Source

pub fn canonical(&self) -> SparseRowMatRef<'_, I, T::Canonical, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::canonical]

Source

pub fn canonical_mut( &mut self, ) -> SparseRowMatMut<'_, I, T::Canonical, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::canonical]

Source

pub fn into_canonical(self) -> SparseRowMat<I, T::Canonical, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::canonical]

Source

pub fn to_col_major( &self, ) -> Result<SparseColMat<I, T::Canonical, Rows, Cols>, FaerError>
where T: Conjugate,

see [SparseRowMatRef::to_col_major]

Source

pub fn to_dense(&self) -> Mat<T::Canonical, Rows, Cols>
where T: Conjugate,

see [SparseRowMatRef::to_dense]

Source

pub fn new_from_argsort( symbolic: SymbolicSparseRowMat<I, Rows, Cols>, argsort: &Argsort<I>, val: &[T], ) -> Result<Self, FaerError>
where T: ComplexField,

create a new matrix from a previously created symbolic structure and value order

the provided values must correspond to the same indices that were provided in the function call from which the order was created

Source

pub fn try_new_from_triplets( nrows: Rows, ncols: Cols, entries: &[Triplet<Idx<Rows, I>, Idx<Cols, I>, T>], ) -> Result<Self, CreationError>
where T: ComplexField,

create a new matrix from triplets

Source

pub fn try_new_from_nonnegative_triplets( nrows: Rows, ncols: Cols, entries: &[Triplet<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>, T>], ) -> Result<Self, CreationError>
where T: ComplexField,

create a new matrix from triplets

negative indices are ignored

Source

pub fn get(&self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&T>

see [SparseRowMatRef::get]

Source

pub fn get_mut(&mut self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&mut T>

see [SparseRowMatRef::get]

Source

pub fn triplet_iter( &self, ) -> impl '_ + Iterator<Item = Triplet<Idx<Rows>, Idx<Cols>, &T>>

see [SparseRowMatRef::triplet_iter]

Trait Implementations§

Source§

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

Source§

fn transpose_apply_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq

computes the workspace layout required to apply the transpose or adjoint o self to a matrix with rhs_ncols columns
Source§

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

applies the transpose of self to rhs, and stores the result in out
Source§

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

applies the adjoint of self to rhs, and stores the result in out
Source§

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

Source§

fn transpose_apply_in_place_scratch( &self, rhs_ncols: usize, par: ParShape, ) -> StackReq

computes the workspace layout required to apply the transpose or adjoint of self to a matrix with rhs_ncols columns in place
Source§

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

applies the transpose of self to rhs, and stores the result in rhs
Source§

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

applies the adjoint of self to rhs, and stores the result in rhs
Source§

impl<Rows: Shape, Cols: Shape, I: Index, T: Debug> Debug for SparseRowMat<I, T, Rows, Cols>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Rows: Shape, Cols: Shape, I: Index, T> Deref for SparseRowMat<I, T, Rows, Cols>

Source§

type Target = SymbolicSparseRowMat<Own<I, Rows, Cols>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<I: Index, T> Index<(usize, usize)> for SparseRowMat<I, T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, (row, col): (usize, usize)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<I: Index, T> IndexMut<(usize, usize)> for SparseRowMat<I, T>

Source§

fn index_mut(&mut self, (row, col): (usize, usize)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

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

Source§

fn nrows(&self) -> usize

output dimension of the operator
Source§

fn ncols(&self) -> usize

input dimension of the operator
Source§

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

computes the workspace layout required to apply self or the conjugate o self to a matrix with rhs_ncols columns
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
Source§

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

Source§

fn apply_in_place_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq

computes the workspace layout required to apply self or the conjugate of self to a matrix with rhs_ncols columns in place
Source§

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

applies self to rhs, and stores the result in rhs
Source§

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

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