Struct parry3d::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
Expand description
The component at the first row and first column of this matrix.
m12: N
Expand description
The component at the first row and second column of this matrix.
m22: N
Expand description
The component at the second row and second column of this matrix.
Implementations
impl<N: SimdRealField> SdpMatrix2<N>
[src]
impl<N: SimdRealField> SdpMatrix2<N>
[src]pub fn new(m11: N, m12: N, m22: N) -> Self
[src]
pub fn new(m11: N, m12: N, m22: N) -> Self
[src]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: Matrix2<N>) -> Self
[src]
pub fn from_sdp_matrix(mat: Matrix2<N>) -> Self
[src]Build an SdpMatrix2
structure from a plain matrix, assuming it is SDP.
No check is performed to ensure mat
is actually SDP.
pub fn diagonal(val: N) -> Self
[src]
pub fn diagonal(val: N) -> Self
[src]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) -> Self
[src]
pub fn add_diagonal(&mut self, elt: N) -> Self
[src]Adds val
to the diagonal components of self
.
pub fn inverse_unchecked(&self) -> Self
[src]
pub fn inverse_unchecked(&self) -> Self
[src]Compute the inverse of this SDP matrix without performing any inversibility check.
pub fn into_matrix(self) -> Matrix2<N>
[src]
pub fn into_matrix(self) -> Matrix2<N>
[src]Convert this SDP matrix to a regular matrix representation.
Trait Implementations
impl<N: SimdRealField> Add<SdpMatrix2<N>> for SdpMatrix2<N>
[src]
impl<N: SimdRealField> Add<SdpMatrix2<N>> for SdpMatrix2<N>
[src]type Output = Self
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: SdpMatrix2<N>) -> Self
[src]
fn add(self, rhs: SdpMatrix2<N>) -> Self
[src]Performs the +
operation. Read more
impl<N: Clone> Clone for SdpMatrix2<N>
[src]
impl<N: Clone> Clone for SdpMatrix2<N>
[src]fn clone(&self) -> SdpMatrix2<N>
[src]
fn clone(&self) -> SdpMatrix2<N>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<N: Debug> Debug for SdpMatrix2<N>
[src]
impl<N: Debug> Debug for SdpMatrix2<N>
[src]impl<N: SimdRealField> Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>> for SdpMatrix2<N>
[src]
impl<N: SimdRealField> Mul<Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>> for SdpMatrix2<N>
[src]impl Mul<f32> for SdpMatrix2<Real>
[src]
impl Mul<f32> for SdpMatrix2<Real>
[src]impl<N: PartialEq> PartialEq<SdpMatrix2<N>> for SdpMatrix2<N>
[src]
impl<N: PartialEq> PartialEq<SdpMatrix2<N>> for SdpMatrix2<N>
[src]fn eq(&self, other: &SdpMatrix2<N>) -> bool
[src]
fn eq(&self, other: &SdpMatrix2<N>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &SdpMatrix2<N>) -> bool
[src]
fn ne(&self, other: &SdpMatrix2<N>) -> bool
[src]This method tests for !=
.
impl<N: Copy> Copy for SdpMatrix2<N>
[src]
impl<N> StructuralPartialEq for SdpMatrix2<N>
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for SdpMatrix2<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for SdpMatrix2<N> where
N: Send,
N: Send,
impl<N> Sync for SdpMatrix2<N> where
N: Sync,
N: Sync,
impl<N> Unpin for SdpMatrix2<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for SdpMatrix2<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
[src]
impl<T> Downcast for T where
T: Any,
[src]pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]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>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]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
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]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)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]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> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn to_subset(&self) -> Option<SS>
[src]The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
[src]
pub fn is_in_subset(&self) -> bool
[src]Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
[src]
pub fn from_subset(element: &SS) -> SP
[src]The inclusion map: converts self
to the equivalent element of its superset.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more