Struct lnkit::prelude::linalg::givens::GivensRotation [−][src]
pub struct GivensRotation<T> where
T: ComplexField, { /* fields omitted */ }
A Givens rotation.
Implementations
impl<T> GivensRotation<T> where
T: ComplexField,
[src]
impl<T> GivensRotation<T> where
T: ComplexField,
[src]pub fn identity() -> GivensRotation<T>
[src]
The Givents rotation that does nothing.
pub fn new_unchecked(
c: <T as ComplexField>::RealField,
s: T
) -> GivensRotation<T>
[src]
c: <T as ComplexField>::RealField,
s: T
) -> GivensRotation<T>
Initializes a Givens rotation from its components.
The components are copies as-is. It is not checked whether they describe an actually valid Givens rotation.
pub fn new(c: T, s: T) -> (GivensRotation<T>, T)
[src]
Initializes a Givens rotation from its non-normalized cosine an sine components.
pub fn try_new(
c: T,
s: T,
eps: <T as ComplexField>::RealField
) -> Option<(GivensRotation<T>, T)>
[src]
c: T,
s: T,
eps: <T as ComplexField>::RealField
) -> Option<(GivensRotation<T>, T)>
Initializes a Givens rotation form its non-normalized cosine an sine components.
pub fn cancel_y<S>(
v: &Matrix<T, Const<{_: usize}>, Const<1_usize>, S>
) -> Option<(GivensRotation<T>, T)> where
S: Storage<T, Const<{_: usize}>, Const<1_usize>>,
[src]
v: &Matrix<T, Const<{_: usize}>, Const<1_usize>, S>
) -> Option<(GivensRotation<T>, T)> where
S: Storage<T, Const<{_: usize}>, Const<1_usize>>,
Computes the rotation R
required such that the y
component of R * v
is zero.
Returns None
if no rotation is needed (i.e. if v.y == 0
). Otherwise, this returns the norm
of v
and the rotation r
such that R * v = [ |v|, 0.0 ]^t
where |v|
is the norm of v
.
pub fn cancel_x<S>(
v: &Matrix<T, Const<{_: usize}>, Const<1_usize>, S>
) -> Option<(GivensRotation<T>, T)> where
S: Storage<T, Const<{_: usize}>, Const<1_usize>>,
[src]
v: &Matrix<T, Const<{_: usize}>, Const<1_usize>, S>
) -> Option<(GivensRotation<T>, T)> where
S: Storage<T, Const<{_: usize}>, Const<1_usize>>,
Computes the rotation R
required such that the x
component of R * v
is zero.
Returns None
if no rotation is needed (i.e. if v.x == 0
). Otherwise, this returns the norm
of v
and the rotation r
such that R * v = [ 0.0, |v| ]^t
where |v|
is the norm of v
.
pub fn c(&self) -> <T as ComplexField>::RealField
[src]
The cos part of this roration.
pub fn s(&self) -> T
[src]
The sin part of this roration.
pub fn inverse(&self) -> GivensRotation<T>
[src]
The inverse of this givens rotation.
pub fn rotate<R2, C2, S2>(&self, rhs: &mut Matrix<T, R2, C2, S2>) where
R2: Dim,
S2: StorageMut<T, R2, C2>,
C2: Dim,
ShapeConstraint: DimEq<R2, Const<{_: usize}>>,
[src]
R2: Dim,
S2: StorageMut<T, R2, C2>,
C2: Dim,
ShapeConstraint: DimEq<R2, Const<{_: usize}>>,
Performs the multiplication rhs = self * rhs
in-place.
pub fn rotate_rows<R2, C2, S2>(&self, lhs: &mut Matrix<T, R2, C2, S2>) where
R2: Dim,
S2: StorageMut<T, R2, C2>,
C2: Dim,
ShapeConstraint: DimEq<C2, Const<{_: usize}>>,
[src]
R2: Dim,
S2: StorageMut<T, R2, C2>,
C2: Dim,
ShapeConstraint: DimEq<C2, Const<{_: usize}>>,
Performs the multiplication lhs = lhs * self
in-place.
Trait Implementations
impl<T> Clone for GivensRotation<T> where
T: Clone + ComplexField,
<T as ComplexField>::RealField: Clone,
[src]
impl<T> Clone for GivensRotation<T> where
T: Clone + ComplexField,
<T as ComplexField>::RealField: Clone,
[src]pub fn clone(&self) -> GivensRotation<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Copy for GivensRotation<T> where
T: Copy + ComplexField,
<T as ComplexField>::RealField: Copy,
[src]
impl<T> Copy for GivensRotation<T> where
T: Copy + ComplexField,
<T as ComplexField>::RealField: Copy,
[src]impl<T> Debug for GivensRotation<T> where
T: Debug + ComplexField,
<T as ComplexField>::RealField: Debug,
[src]
impl<T> Debug for GivensRotation<T> where
T: Debug + ComplexField,
<T as ComplexField>::RealField: Debug,
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for GivensRotation<T> where
T: RefUnwindSafe,
<T as ComplexField>::RealField: RefUnwindSafe,
impl<T> RefUnwindSafe for GivensRotation<T> where
T: RefUnwindSafe,
<T as ComplexField>::RealField: RefUnwindSafe,
impl<T> Send for GivensRotation<T>
impl<T> Send for GivensRotation<T>
impl<T> Sync for GivensRotation<T>
impl<T> Sync for GivensRotation<T>
impl<T> Unpin for GivensRotation<T> where
T: Unpin,
<T as ComplexField>::RealField: Unpin,
impl<T> Unpin for GivensRotation<T> where
T: Unpin,
<T as ComplexField>::RealField: Unpin,
impl<T> UnwindSafe for GivensRotation<T> where
T: UnwindSafe,
<T as ComplexField>::RealField: UnwindSafe,
impl<T> UnwindSafe for GivensRotation<T> where
T: UnwindSafe,
<T as ComplexField>::RealField: UnwindSafe,
Blanket Implementations
impl<T, U> Cast<U> for T where
U: FromCast<T>,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> FromBits<T> for T
impl<T> FromBits<T> for T
pub fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
pub fn into_bits(self) -> U
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,