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 am × min(m, n)
lower-triangular matrix.U
which is amin(m, n) × n
upper-triangular matrix.P
which is am * m
permutation matrix.
Those are such that M == P * L * U
.
Methods
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]
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>>,
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]
DefaultAllocator: Allocator<N, R, C2>,
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]
&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>,
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]
&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>,
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]
&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>,
Solves the linear system self.conjugate_transpose() * 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]
DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>,
Solves in-place the linear system self * x = b
, where x
is the unknown to be determined.
Retuns 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]
&self,
b: &mut MatrixMN<N, R2, C2>
) -> bool where
DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>,
Solves in-place the linear system self.transpose() * x = b
, where x
is the unknown to be
determined.
Retuns false
if no solution was found (the decomposed matrix is singular).
pub fn solve_conjugate_transpose_mut<R2: Dim, C2: Dim>(
&self,
b: &mut MatrixMN<N, R2, C2>
) -> bool where
DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>,
[src]
&self,
b: &mut MatrixMN<N, R2, C2>
) -> bool where
DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>,
Solves in-place the linear system self.conjugate_transpose() * x = b
, where x
is the unknown to
be determined.
Retuns 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]
N: Zero + One,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<N, D, D> + Allocator<i32, D>,
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]
DefaultAllocator: Allocator<i32, DimMinimum<R, C>> + Allocator<N, R, C>,
fn clone(&self) -> LU<N, R, C>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
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]
DefaultAllocator: Allocator<i32, DimMinimum<R, C>> + Allocator<N, R, C>,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<N: Scalar, 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]
DefaultAllocator: Allocator<N, R, C> + Allocator<i32, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Copy,
VectorN<i32, DimMinimum<R, C>>: Copy,