pub struct Mat<R> { /* private fields */ }Implementations§
Source§impl<R> Mat<R>where
R: Scalar,
impl<R> Mat<R>where
R: Scalar,
pub fn from_data<I>(shape: (usize, usize), data: I) -> Selfwhere
I: IntoIterator<Item = R>,
pub fn zero(shape: (usize, usize)) -> Selfwhere
R: Zero,
pub fn is_zero(&self) -> boolwhere
R: Zero,
pub fn id(size: usize) -> Self
pub fn is_id(&self) -> bool
pub fn diag<I>(shape: (usize, usize), entries: I) -> Selfwhere
R: Zero,
I: IntoIterator<Item = R>,
pub fn is_diag(&self) -> boolwhere
R: Zero,
pub fn submat(&self, rows: Range<usize>, cols: Range<usize>) -> Mat<R>
pub fn submat_rows(&self, rows: Range<usize>) -> Mat<R>
pub fn submat_cols(&self, cols: Range<usize>) -> Mat<R>
pub fn into_sparse(self) -> SpMat<R>where
R: Zero + ClosedAddAssign,
Source§impl<R> Mat<R>where
R: Scalar,
impl<R> Mat<R>where
R: Scalar,
pub fn swap_rows(&mut self, i: usize, j: usize)
pub fn swap_cols(&mut self, i: usize, j: usize)
pub fn mul_row(&mut self, i: usize, r: &R)where
R: ClosedMulAssign,
pub fn mul_col(&mut self, j: usize, r: &R)where
R: ClosedMulAssign,
pub fn add_row_to(&mut self, i: usize, j: usize, r: &R)where
R: ClosedAddAssign + ClosedMulAssign,
pub fn add_col_to(&mut self, i: usize, j: usize, r: &R)where
R: ClosedAddAssign + ClosedMulAssign,
pub fn left_elementary(&mut self, comps: [&R; 4], i: usize, j: usize)where
R: ClosedAddAssign + ClosedMulAssign,
pub fn right_elementary(&mut self, comps: [&R; 4], i: usize, j: usize)where
R: ClosedAddAssign + ClosedMulAssign,
Trait Implementations§
Source§impl<R> AddAssign for Mat<R>where
R: Scalar + ClosedAddAssign,
impl<R> AddAssign for Mat<R>where
R: Scalar + ClosedAddAssign,
Source§fn add_assign(&mut self, rhs: Mat<R>)
fn add_assign(&mut self, rhs: Mat<R>)
Performs the
+= operation. Read moreSource§impl<R> AddAssign<&Mat<R>> for Mat<R>where
R: Scalar + ClosedAddAssign,
impl<R> AddAssign<&Mat<R>> for Mat<R>where
R: Scalar + ClosedAddAssign,
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Performs the
+= operation. Read moreimpl<R: Eq> Eq for Mat<R>
Source§impl<'a, 'b, R> MulAssign for Mat<R>
impl<'a, 'b, R> MulAssign for Mat<R>
Source§fn mul_assign(&mut self, rhs: Mat<R>)
fn mul_assign(&mut self, rhs: Mat<R>)
Performs the
*= operation. Read moreSource§impl<'a, 'b, R> MulAssign<&'b Mat<R>> for Mat<R>
impl<'a, 'b, R> MulAssign<&'b Mat<R>> for Mat<R>
Source§fn mul_assign(&mut self, rhs: &'b Mat<R>)
fn mul_assign(&mut self, rhs: &'b Mat<R>)
Performs the
*= operation. Read moreimpl<R> StructuralPartialEq for Mat<R>
Auto Trait Implementations§
impl<R> Freeze for Mat<R>
impl<R> RefUnwindSafe for Mat<R>where
R: RefUnwindSafe,
impl<R> Send for Mat<R>where
R: Send,
impl<R> Sync for Mat<R>where
R: Sync,
impl<R> Unpin for Mat<R>where
R: Unpin,
impl<R> UnsafeUnpin for Mat<R>
impl<R> UnwindSafe for Mat<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, Right> ClosedAdd<Right> for T
impl<T, Right> ClosedAdd<Right> for T
impl<T, Right> ClosedAddAssign<Right> for T
impl<T, Right> ClosedMul<Right> for T
impl<T, Right> ClosedMul<Right> for T
impl<T, Right> ClosedMulAssign<Right> for T
impl<T> ClosedNeg for Twhere
T: Neg<Output = T>,
impl<T> ClosedNeg for Twhere
T: Neg<Output = T>,
impl<T, Right> ClosedSub<Right> for T
impl<T, Right> ClosedSub<Right> for T
impl<T, Right> ClosedSubAssign<Right> for T
impl<T> ElemBase for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.