DiagMut

Type Alias DiagMut 

Source
pub type DiagMut<'a, T, Dim = usize, Stride = isize> = Diag<Mut<'a, T, Dim, Stride>>;
Expand description

diagonal mutable matrix view

Aliased Type§

#[repr(transparent)]
pub struct DiagMut<'a, T, Dim = usize, Stride = isize>(pub Mut<'a, T, Dim, Stride>);

Tuple Fields§

§0: Mut<'a, T, Dim, Stride>

Implementations§

Source§

impl<'a, T> DiagMut<'a, T>

Source

pub fn from_mut(value: &'a mut T) -> Self

creates a diagonal matrix view over the given element

Source

pub fn from_slice_mut(slice: &'a mut [T]) -> Self

creates a DiagMut from slice views over the diagonal data, the result has the same dimension as the length of the input slice

Source§

impl<'a, T, Dim: Shape, Stride: Stride> DiagMut<'a, T, Dim, Stride>

Source

pub const unsafe fn from_raw_parts_mut( ptr: *mut T, dim: Dim, stride: Stride, ) -> Self

creates a DiagMut from pointers to the diagonal data, dimension, and stride

§safety

this function has the same safety requirements as [MatMut::from_raw_parts_mut(ptr, dim, 1, stride, 0)]

Source

pub fn column_vector(self) -> ColRef<'a, T, Dim, Stride>

returns the diagonal as a column vector view

Source

pub fn column_vector_mut(self) -> ColMut<'a, T, Dim, Stride>

returns the diagonal as a mutable column vector view

Source

pub fn as_ref(&self) -> DiagRef<'_, T, Dim, Stride>

returns a view over self

Source

pub fn as_mut(&mut self) -> DiagMut<'_, T, Dim, Stride>

returns a view over self

Source

pub fn fill(&mut self, value: T)
where T: Clone,

fills all the elements of self with value

Source

pub fn as_shape<D: Shape>(self, len: D) -> DiagRef<'a, T, D, Stride>

Source

pub fn as_dyn(self) -> DiagRef<'a, T, usize, Stride>

Source

pub fn as_dyn_stride(self) -> DiagRef<'a, T, Dim>

Source

pub fn conjugate(self) -> DiagRef<'a, T::Conj, Dim, Stride>
where T: Conjugate,

Source

pub fn canonical(self) -> DiagRef<'a, T::Canonical, Dim, Stride>
where T: Conjugate,

Source

pub fn as_shape_mut<D: Shape>(self, len: D) -> DiagMut<'a, T, D, Stride>

Source

pub fn as_dyn_mut(self) -> DiagMut<'a, T, usize, Stride>

Source

pub fn as_dyn_stride_mut(self) -> DiagMut<'a, T, Dim>

Source

pub fn conjugate_mut(self) -> DiagMut<'a, T::Conj, Dim, Stride>
where T: Conjugate,

Source

pub fn canonical_mut(self) -> DiagMut<'a, T::Canonical, Dim, Stride>
where T: Conjugate,

Source

pub fn dim(&self) -> Dim

returns the dimension of self

Source

pub fn copy_from<RhsT: Conjugate<Canonical = T>>( &mut self, rhs: impl AsDiagRef<T = RhsT, Dim = Dim>, )
where T: ComplexField,

copies other into self

Trait Implementations§

Source§

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

Source§

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

computes the workspace size and alignment 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<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for DiagMut<'_, ViewT>

Source§

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

computes the workspace size and alignment 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<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for DiagMut<'_, 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: Par) -> StackReq

computes the workspace size and alignment 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<T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for DiagMut<'_, ViewT>

Source§

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

computes the workspace size and alignment 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