[][src]Struct na::linalg::LU

pub struct LU<N, R, C> where
    C: Dim,
    N: ComplexField,
    R: DimMin<C>,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<(usize, usize), <R as DimMin<C>>::Output, U1>, 
{ /* fields omitted */ }

LU decomposition with partial (row) pivoting.

Methods

impl<N, R, C> LU<N, R, C> where
    C: Dim,
    N: ComplexField,
    R: DimMin<C>,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<(usize, usize), <R as DimMin<C>>::Output, U1>, 
[src]

pub fn new(
    matrix: Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>
) -> LU<N, R, C>
[src]

Computes the LU decomposition with partial (row) pivoting of matrix.

pub fn l(
    &self
) -> Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer> where
    DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>, 
[src]

The lower triangular matrix of this decomposition.

pub fn l_unpack(
    self
) -> Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer> where
    DefaultAllocator: Reallocator<N, R, C, R, <R as DimMin<C>>::Output>, 
[src]

The lower triangular matrix of this decomposition.

pub fn u(
    &self
) -> Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer> where
    DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, C>, 
[src]

The upper triangular matrix of this decomposition.

pub fn p(&self) -> &PermutationSequence<<R as DimMin<C>>::Output>[src]

The row permutations of this decomposition.

pub fn unpack(
    self
) -> (PermutationSequence<<R as DimMin<C>>::Output>, Matrix<N, R, <R as DimMin<C>>::Output, <DefaultAllocator as Allocator<N, R, <R as DimMin<C>>::Output>>::Buffer>, Matrix<N, <R as DimMin<C>>::Output, C, <DefaultAllocator as Allocator<N, <R as DimMin<C>>::Output, C>>::Buffer>) where
    DefaultAllocator: Allocator<N, R, <R as DimMin<C>>::Output>,
    DefaultAllocator: Allocator<N, <R as DimMin<C>>::Output, C>,
    DefaultAllocator: Reallocator<N, R, C, R, <R as DimMin<C>>::Output>, 
[src]

The row permutations and two triangular matrices of this decomposition: (P, L, U).

impl<N, D> LU<N, D, D> where
    D: DimMin<D, Output = D>,
    N: ComplexField,
    DefaultAllocator: Allocator<N, D, D>,
    DefaultAllocator: Allocator<(usize, usize), D, U1>, 
[src]

pub fn solve<R2, C2, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<Matrix<N, R2, C2, <DefaultAllocator as Allocator<N, R2, C2>>::Buffer>> where
    C2: Dim,
    R2: Dim,
    S2: Storage<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<R2, D>,
    DefaultAllocator: Allocator<N, R2, C2>, 
[src]

Solves the linear system self * x = b, where x is the unknown to be determined.

Returns None if self is not invertible.

pub fn solve_mut<R2, C2, S2>(&self, b: &mut Matrix<N, R2, C2, S2>) -> bool where
    C2: Dim,
    R2: Dim,
    S2: StorageMut<N, R2, C2>,
    ShapeConstraint: SameNumberOfRows<R2, D>, 
[src]

Solves the linear system self * x = b, where x is the unknown to be determined.

If the decomposed matrix is not invertible, this returns false and its input b may be overwritten with garbage.

pub fn try_inverse(
    &self
) -> Option<Matrix<N, D, D, <DefaultAllocator as Allocator<N, D, D>>::Buffer>>
[src]

Computes the inverse of the decomposed matrix.

Returns None if the matrix is not invertible.

pub fn try_inverse_to<S2>(&self, out: &mut Matrix<N, D, D, S2>) -> bool where
    S2: StorageMut<N, D, D>, 
[src]

Computes the inverse of the decomposed matrix and outputs the result to out.

If the decomposed matrix is not invertible, this returns false and out may be overwritten with garbage.

pub fn determinant(&self) -> N[src]

Computes the determinant of the decomposed matrix.

pub fn is_invertible(&self) -> bool[src]

Indicates if the decomposed matrix is invertible.

Trait Implementations

impl<N, R, C> Copy for LU<N, R, C> where
    C: Dim,
    N: ComplexField,
    R: DimMin<C>,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<(usize, usize), <R as DimMin<C>>::Output, U1>,
    Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer>: Copy,
    PermutationSequence<<R as DimMin<C>>::Output>: Copy
[src]

impl<N, R, C> Clone for LU<N, R, C> where
    C: Dim + Clone,
    N: Clone + ComplexField,
    R: DimMin<C> + Clone,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<(usize, usize), <R as DimMin<C>>::Output, U1>, 
[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N, R, C> Debug for LU<N, R, C> where
    C: Dim + Debug,
    N: Debug + ComplexField,
    R: DimMin<C> + Debug,
    DefaultAllocator: Allocator<N, R, C>,
    DefaultAllocator: Allocator<(usize, usize), <R as DimMin<C>>::Output, U1>, 
[src]

Auto Trait Implementations

impl<N, R, C> !Send for LU<N, R, C>

impl<N, R, C> !Sync for LU<N, R, C>

Blanket Implementations

impl<V> IntoVec for V[src]

impl<V> IntoPnt for V[src]

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]