pub struct SymmetricEigen2 {
pub eigenvalues: Vec2,
pub eigenvectors: Mat2,
}
Expand description
The eigen decomposition of a SymmetricMat2
.
Fields§
§eigenvalues: Vec2
The eigenvalues of the SymmetricMat2
.
These should be in ascending order eigen1 <= eigen2
.
eigenvectors: Mat2
The eigenvectors of the SymmetricMat2
.
They should be unit length and orthogonal to each other.
The eigenvectors are ordered to correspond to the eigenvalues. For example,
eigenvectors.x_axis
corresponds to eigenvalues.x
.
Implementations§
Source§impl SymmetricEigen2
impl SymmetricEigen2
Sourcepub fn new(mat: SymmetricMat2) -> Self
pub fn new(mat: SymmetricMat2) -> Self
Computes the eigen decomposition of the given SymmetricMat2
.
The eigenvalues are returned in ascending order eigen1 <= eigen2
.
This can be reversed with the reverse
method.
Sourcepub fn reverse(&self) -> Self
pub fn reverse(&self) -> Self
Reverses the order of the eigenvalues and their corresponding eigenvectors.
Sourcepub fn eigenvalues(mat: SymmetricMat2) -> Vec2
pub fn eigenvalues(mat: SymmetricMat2) -> Vec2
Computes the eigenvalues of a SymmetricMat2
.
Reference: https://croninprojects.org/Vince/Geodesy/FindingEigenvectors.pdf
Sourcepub fn eigenvector(mat: SymmetricMat2, eigenvalue: f32) -> Vec2
pub fn eigenvector(mat: SymmetricMat2, eigenvalue: f32) -> Vec2
Computes the unit-length eigenvector corresponding to the given eigenvalue
of the symmetric 2x2 mat
.
Reference: https://croninprojects.org/Vince/Geodesy/FindingEigenvectors.pdf
Trait Implementations§
Source§impl Clone for SymmetricEigen2
impl Clone for SymmetricEigen2
Source§fn clone(&self) -> SymmetricEigen2
fn clone(&self) -> SymmetricEigen2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SymmetricEigen2
impl Debug for SymmetricEigen2
Source§impl PartialEq for SymmetricEigen2
impl PartialEq for SymmetricEigen2
impl Copy for SymmetricEigen2
impl StructuralPartialEq for SymmetricEigen2
Auto Trait Implementations§
impl Freeze for SymmetricEigen2
impl RefUnwindSafe for SymmetricEigen2
impl Send for SymmetricEigen2
impl Sync for SymmetricEigen2
impl Unpin for SymmetricEigen2
impl UnwindSafe for SymmetricEigen2
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
, which can then be
downcast
into Box<dyn 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>
, which 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.