Struct heron::rapier_plugin::rapier::utils::SdpMatrix2[]

pub struct SdpMatrix2<N> {
    pub m11: N,
    pub m12: N,
    pub m22: N,
}

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

impl<N> SdpMatrix2<N> where
    N: SimdRealField

pub fn new(m11: N, m12: N, m22: N) -> SdpMatrix2<N>

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, U2, U2, <DefaultAllocator as Allocator<N, U2, U2>>::Buffer>
) -> SdpMatrix2<N>

Build an SdpMatrix2 structure from a plain matrix, assuming it is SDP.

No check is performed to ensure mat is actually SDP.

pub fn zero() -> SdpMatrix2<N>

Create a new SDP matrix filled with zeros.

pub fn diagonal(val: N) -> SdpMatrix2<N>

Create a new SDP matrix with its diagonal filled with val, and its off-diagonal elements set to zero.

pub fn add_diagonal(&mut self, elt: N) -> SdpMatrix2<N>

Adds val to the diagonal components of self.

pub fn inverse_unchecked(&self) -> SdpMatrix2<N>

Compute the inverse of this SDP matrix without performing any inversibility check.

pub fn into_matrix(
    self
) -> Matrix<N, U2, U2, <DefaultAllocator as Allocator<N, U2, U2>>::Buffer>

Convert this SDP matrix to a regular matrix representation.

Trait Implementations

impl<N> Add<SdpMatrix2<N>> for SdpMatrix2<N> where
    N: SimdRealField

type Output = SdpMatrix2<N>

The resulting type after applying the + operator.

impl<N> Clone for SdpMatrix2<N> where
    N: Clone

impl<N> Copy for SdpMatrix2<N> where
    N: Copy

impl<N> Debug for SdpMatrix2<N> where
    N: Debug

impl<N> Mul<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>> for SdpMatrix2<N> where
    N: SimdRealField

type Output = Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>

The resulting type after applying the * operator.

impl<N> PartialEq<SdpMatrix2<N>> for SdpMatrix2<N> where
    N: PartialEq<N>, 

impl<N> StructuralPartialEq for SdpMatrix2<N>

Auto Trait Implementations

impl<N> RefUnwindSafe for SdpMatrix2<N> where
    N: RefUnwindSafe
[src]

impl<N> Send for SdpMatrix2<N> where
    N: Send
[src]

impl<N> Sync for SdpMatrix2<N> where
    N: Sync
[src]

impl<N> Unpin for SdpMatrix2<N> where
    N: Unpin
[src]

impl<N> UnwindSafe for SdpMatrix2<N> where
    N: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> Slottable for T where
    T: Copy
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,