pub type DiagRef<'a, T, Dim = usize, Stride = isize> = Diag<Ref<'a, T, Dim, Stride>>;Expand description
diagonal matrix view
Aliased Type§
#[repr(transparent)]pub struct DiagRef<'a, T, Dim = usize, Stride = isize>(pub Ref<'a, T, Dim, Stride>);Tuple Fields§
§0: Ref<'a, T, Dim, Stride>Implementations§
Source§impl<'a, T, Dim: Shape, Stride: Stride> DiagRef<'a, T, Dim, Stride>
impl<'a, T, Dim: Shape, Stride: Stride> DiagRef<'a, T, Dim, Stride>
Sourcepub const unsafe fn from_raw_parts(
ptr: *const T,
dim: Dim,
stride: Stride,
) -> Self
pub const unsafe fn from_raw_parts( ptr: *const T, dim: Dim, stride: Stride, ) -> Self
creates a DiagRef from pointers to the diagonal data, dimension, and stride
§safety
this function has the same safety requirements as
[MatRef::from_raw_parts(ptr, dim, 1, stride, 0)]
Sourcepub fn column_vector(self) -> ColRef<'a, T, Dim, Stride>
pub fn column_vector(self) -> ColRef<'a, T, Dim, Stride>
returns the diagonal as a column vector view.
Sourcepub fn as_shape<D: Shape>(self, len: D) -> DiagRef<'a, T, D, Stride>
pub fn as_shape<D: Shape>(self, len: D) -> DiagRef<'a, T, D, Stride>
returns the input matrix with the given shape after checking that it matches the current shape
Sourcepub fn as_dyn(self) -> DiagRef<'a, T, usize, Stride>
pub fn as_dyn(self) -> DiagRef<'a, T, usize, Stride>
returns the input matrix with dynamic shape
Sourcepub fn as_dyn_stride(self) -> DiagRef<'a, T, Dim>
pub fn as_dyn_stride(self) -> DiagRef<'a, T, Dim>
returns the input matrix with dynamic stride
Sourcepub fn conjugate(self) -> DiagRef<'a, T::Conj, Dim, Stride>where
T: Conjugate,
pub fn conjugate(self) -> DiagRef<'a, T::Conj, Dim, Stride>where
T: Conjugate,
returns a view over the conjugate of self
Trait Implementations§
Source§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for DiagRef<'_, ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for DiagRef<'_, ViewT>
Source§fn transpose_apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
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 columnsSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for DiagRef<'_, ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for DiagRef<'_, ViewT>
Source§fn transpose_apply_in_place_scratch(
&self,
rhs_ncols: usize,
par: Par,
) -> StackReq
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 placeSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for DiagRef<'_, ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for DiagRef<'_, ViewT>
Source§fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
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 columnsSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for DiagRef<'_, ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for DiagRef<'_, ViewT>
Source§fn apply_in_place_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
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