Struct nalgebra_lapack::LU [−][src]
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
.
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]
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.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]
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.
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]
&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.
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]
&self,
b: &mut MatrixMN<N, R2, C2>
) -> bool where
DefaultAllocator: Allocator<N, R2, C2> + Allocator<i32, R2>,
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]
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>,
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]
DefaultAllocator: Allocator<N, R, C> + Allocator<i32, DimMinimum<R, C>>,
MatrixMN<N, R, C>: Copy,
VectorN<i32, DimMinimum<R, C>>: Copy,
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>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<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>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,