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]

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]

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]

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]

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]

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]

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]

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> 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]

Auto Trait Implementations

impl<T> RefUnwindSafe for GivensRotation<T> where
    T: RefUnwindSafe,
    <T as ComplexField>::RealField: RefUnwindSafe

impl<T> Send 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> UnwindSafe for GivensRotation<T> where
    T: UnwindSafe,
    <T as ComplexField>::RealField: UnwindSafe

Blanket Implementations

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

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

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

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> Downcast for T where
    T: Any

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

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Pointable for T

type Init = T

The type for initializers.

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<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<V, T> VZip<V> for T where
    V: MultiLane<T>,