Struct parry3d::utils::SdpMatrix3
source · pub struct SdpMatrix3<N> {
pub m11: N,
pub m12: N,
pub m13: N,
pub m22: N,
pub m23: N,
pub m33: N,
}
Expand description
A 3x3 symmetric-definite-positive matrix.
Fields§
§m11: N
The component at the first row and first column of this matrix.
m12: N
The component at the first row and second column of this matrix.
m13: N
The component at the first row and third column of this matrix.
m22: N
The component at the second row and second column of this matrix.
m23: N
The component at the second row and third column of this matrix.
m33: N
The component at the third row and third column of this matrix.
Implementations§
source§impl<N: SimdRealField + Copy> SdpMatrix3<N>
impl<N: SimdRealField + Copy> SdpMatrix3<N>
sourcepub fn new(m11: N, m12: N, m13: N, m22: N, m23: N, m33: N) -> Self
pub fn new(m11: N, m12: N, m13: N, m22: N, m23: N, m33: N) -> Self
A new SDP 3x3 matrix with the given components.
Because the matrix is symmetric, only the lower off-diagonal components is required.
sourcepub fn from_sdp_matrix(mat: Matrix3<N>) -> Self
pub fn from_sdp_matrix(mat: Matrix3<N>) -> Self
Build an SdpMatrix3
structure from a plain matrix, assuming it is SDP.
No check is performed to ensure mat
is actually SDP.
sourcepub fn diagonal(val: N) -> Self
pub fn diagonal(val: N) -> Self
Create a new SDP matrix with its diagonal filled with val
, and its off-diagonal elements set to zero.
sourcepub fn inverse_unchecked(&self) -> Self
pub fn inverse_unchecked(&self) -> Self
Compute the inverse of this SDP matrix without performing any inversibility check.
sourcepub fn quadform3x2(&self, m: &Matrix3x2<N>) -> SdpMatrix2<N>
pub fn quadform3x2(&self, m: &Matrix3x2<N>) -> SdpMatrix2<N>
Compute the quadratic form m.transpose() * self * m
.
sourcepub fn quadform(&self, m: &Matrix3<N>) -> Self
pub fn quadform(&self, m: &Matrix3<N>) -> Self
Compute the quadratic form m.transpose() * self * m
.
sourcepub fn add_diagonal(&self, elt: N) -> Self
pub fn add_diagonal(&self, elt: N) -> Self
Adds elt
to the diagonal components of self
.
Trait Implementations§
source§impl<N: Add<N>> Add for SdpMatrix3<N>
impl<N: Add<N>> Add for SdpMatrix3<N>
source§impl<N: Clone> Clone for SdpMatrix3<N>
impl<N: Clone> Clone for SdpMatrix3<N>
source§fn clone(&self) -> SdpMatrix3<N>
fn clone(&self) -> SdpMatrix3<N>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<N: Debug> Debug for SdpMatrix3<N>
impl<N: Debug> Debug for SdpMatrix3<N>
source§impl<T> From<[SdpMatrix3<f32>; 4]> for SdpMatrix3<T>
impl<T> From<[SdpMatrix3<f32>; 4]> for SdpMatrix3<T>
source§impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for SdpMatrix3<N>
impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for SdpMatrix3<N>
source§impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>> for SdpMatrix3<N>
impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>> for SdpMatrix3<N>
source§impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>> for SdpMatrix3<N>
impl<N: SimdRealField + Copy> Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>> for SdpMatrix3<N>
source§impl<N: PartialEq> PartialEq for SdpMatrix3<N>
impl<N: PartialEq> PartialEq for SdpMatrix3<N>
source§fn eq(&self, other: &SdpMatrix3<N>) -> bool
fn eq(&self, other: &SdpMatrix3<N>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<N: Copy> Copy for SdpMatrix3<N>
impl<N> StructuralPartialEq for SdpMatrix3<N>
Auto Trait Implementations§
impl<N> Freeze for SdpMatrix3<N>where
N: Freeze,
impl<N> RefUnwindSafe for SdpMatrix3<N>where
N: RefUnwindSafe,
impl<N> Send for SdpMatrix3<N>where
N: Send,
impl<N> Sync for SdpMatrix3<N>where
N: Sync,
impl<N> Unpin for SdpMatrix3<N>where
N: Unpin,
impl<N> UnwindSafe for SdpMatrix3<N>where
N: 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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync 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>
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>
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<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>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.