Struct nalgebra_lapack::LU[][src]

pub struct LU<N: Scalar, R: DimMin<C>, C: Dim> where
    DefaultAllocator: Allocator<i32, DimMinimum<R, C>> + Allocator<N, R, C>, 
{ /* fields omitted */ }

LU decomposition with partial pivoting.

This decomposes a matrix M with m rows and n columns into three parts:

  • L which is a m × min(m, n) lower-triangular matrix.
  • U which is a min(m, n) × n upper-triangular matrix.
  • P which is a m * m permutation matrix.

Those are such that M == P * L * U.

Implementations

impl<N: LUScalar, R: Dim, C: Dim> LU<N, R, C> where
    N: Zero + One,
    R: DimMin<C>,
    DefaultAllocator: Allocator<N, R, C> + Allocator<N, R, R> + Allocator<N, R, DimMinimum<R, C>> + Allocator<N, DimMinimum<R, C>, C> + Allocator<i32, DimMinimum<R, C>>, 
[src]

pub fn new(m: MatrixMN<N, R, C>) -> Self[src]

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

pub fn l(&self) -> MatrixMN<N, R, DimMinimum<R, C>>[src]

Gets the lower-triangular matrix part of the decomposition.

pub fn u(&self) -> MatrixMN<N, DimMinimum<R, C>, C>[src]

Gets the upper-triangular matrix part of the decomposition.

pub fn p(&self) -> MatrixN<N, R>[src]

Gets the row permutation matrix of this decomposition.

Computing the permutation matrix explicitly is costly and usually not necessary. To permute rows of a matrix or vector, use the method self.permute(...) instead.

pub fn permutation_indices(&self) -> &VectorN<i32, DimMinimum<R, C>>[src]

Gets the LAPACK permutation indices.

pub fn permute<C2: Dim>(&self, rhs: &mut MatrixMN<N, R, C2>) where
    DefaultAllocator: Allocator<N, R, C2>, 
[src]

Applies the permutation matrix to a given matrix or vector in-place.

pub fn solve<R2: Dim, C2: Dim, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<MatrixMN<N, R2, C2>> where
    S2: Storage<N, R2, C2>,
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

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

pub fn solve_transpose<R2: Dim, C2: Dim, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<MatrixMN<N, R2, C2>> where
    S2: Storage<N, R2, C2>,
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

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

pub fn solve_conjugate_transpose<R2: Dim, C2: Dim, S2>(
    &self,
    b: &Matrix<N, R2, C2, S2>
) -> Option<MatrixMN<N, R2, C2>> where
    S2: Storage<N, R2, C2>,
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

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

pub fn solve_mut<R2: Dim, C2: Dim>(&self, b: &mut MatrixMN<N, R2, C2>) -> bool where
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

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

Returns false if no solution was found (the decomposed matrix is singular).

pub fn solve_transpose_mut<R2: Dim, C2: Dim>(
    &self,
    b: &mut MatrixMN<N, R2, C2>
) -> bool where
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

Solves in-place the linear system self.transpose() * x = b, where x is the unknown to be determined.

Returns false if no solution was found (the decomposed matrix is singular).

pub fn solve_adjoint_mut<R2: Dim, C2: Dim>(
    &self,
    b: &mut MatrixMN<N, R2, C2>
) -> bool where
    DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>, 
[src]

Solves in-place the linear system self.adjoint() * x = b, where x is the unknown to be determined.

Returns false if no solution was found (the decomposed matrix is singular).

impl<N: LUScalar, D: Dim> LU<N, D, D> where
    N: Zero + One,
    D: DimMin<D, Output = D>,
    DefaultAllocator: Allocator<N, D, D> + Allocator<i32, D>, 
[src]

pub fn inverse(self) -> Option<MatrixN<N, D>>[src]

Computes the inverse of the decomposed matrix.

Trait Implementations

impl<N: Clone + Scalar, R: Clone + DimMin<C>, C: Clone + Dim> Clone for LU<N, R, C> where
    DefaultAllocator: Allocator<i32, DimMinimum<R, C>> + Allocator<N, R, C>, 
[src]

impl<N: Scalar + Copy, R: DimMin<C>, C: Dim> Copy for LU<N, R, C> where
    DefaultAllocator: Allocator<N, R, C> + Allocator<i32, DimMinimum<R, C>>,
    MatrixMN<N, R, C>: Copy,
    VectorN<i32, DimMinimum<R, C>>: Copy
[src]

impl<N: Debug + Scalar, R: Debug + DimMin<C>, C: Debug + Dim> Debug for LU<N, R, C> where
    DefaultAllocator: Allocator<i32, DimMinimum<R, C>> + Allocator<N, R, C>, 
[src]

Auto Trait Implementations

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

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

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

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

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

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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