Struct heron::rapier_plugin::rapier2d::parry::utils::SdpMatrix2 [−][src]
pub struct SdpMatrix2<N> {
pub m11: N,
pub m12: N,
pub m22: N,
}
Expand description
A 2x2 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.
m22: N
The component at the second row and second column of this matrix.
Implementations
A new SDP 2x2 matrix with the given components.
Because the matrix is symmetric, only the lower off-diagonal component is required.
pub fn from_sdp_matrix(
mat: Matrix<N, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<N, 2_usize, 2_usize>>
) -> SdpMatrix2<N>
pub fn from_sdp_matrix(
mat: Matrix<N, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<N, 2_usize, 2_usize>>
) -> SdpMatrix2<N>
Build an SdpMatrix2
structure from a plain matrix, assuming it is SDP.
No check is performed to ensure mat
is actually SDP.
Create a new SDP matrix filled with zeros.
Create a new SDP matrix with its diagonal filled with val
, and its off-diagonal elements set to zero.
Adds val
to the diagonal components of self
.
Compute the inverse of this SDP matrix without performing any inversibility check.
pub fn into_matrix(
self
) -> Matrix<N, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<N, 2_usize, 2_usize>>
pub fn into_matrix(
self
) -> Matrix<N, Const<{_: usize}>, Const<{_: usize}>, ArrayStorage<N, 2_usize, 2_usize>>
Convert this SDP matrix to a regular matrix representation.
Trait Implementations
type Output = SdpMatrix2<N>
type Output = SdpMatrix2<N>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<N> Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>> for SdpMatrix2<N> where
N: SimdRealField + Copy,
impl<N> Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>> for SdpMatrix2<N> where
N: SimdRealField + Copy,
type Output = Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
type Output = Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
) -> <SdpMatrix2<N> as Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>>>::Output
pub fn mul(
self,
rhs: Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
) -> <SdpMatrix2<N> as Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>>>::Output
Performs the *
operation. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<N> RefUnwindSafe for SdpMatrix2<N> where
N: RefUnwindSafe,
impl<N> Send for SdpMatrix2<N> where
N: Send,
impl<N> Sync for SdpMatrix2<N> where
N: Sync,
impl<N> Unpin for SdpMatrix2<N> where
N: Unpin,
impl<N> UnwindSafe for SdpMatrix2<N> where
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more