Linear
Linear::LUP< T, N, Flags > Struct Template Reference

Struct for LUP decomposition. More...

#include <Decomp.h>

Public Member Functions

template<size_t P, size_t Q, unsigned int Flags2>
 LUP (const Matrix< T, P, Q, Flags2 > &A)
 Constructor. More...
 
template<size_t P, size_t Q, unsigned int Flags2>
void Compute (Matrix< T, P, Q, Flags2 > A)
 Computes the LUP decomposition. More...
 

Public Attributes

SquareMatrix< T, N, Flags > L
 
SquareMatrix< T, N, Flags > U
 
SquareMatrix< T, N, Flags > P
 

Detailed Description

template<typename T, size_t N, unsigned int Flags = 0>
struct Linear::LUP< T, N, Flags >

Struct for LUP decomposition.

This struct finds NxN matrix L, NxN matrix U and NxN matrix P such that \(PA=LU\), L is lower triangular, U is upper triangular and P is a permutation matrix.

Parameters
TType to store matrix entries as.
NSize of the L,U,P matrices (all three are square). Dynamic is allowed for N.
FlagsFlags to pass to the matrices (default = row major).

Constructor & Destructor Documentation

◆ LUP()

template<typename T , size_t N, unsigned int Flags = 0>
template<size_t P, size_t Q, unsigned int Flags2>
Linear::LUP< T, N, Flags >::LUP ( const Matrix< T, P, Q, Flags2 > &  A)
inline

Constructor.

Just calls Compute.

Parameters
APxQ Matrix

Member Function Documentation

◆ Compute()

template<typename T , size_t N, unsigned int Flags = 0>
template<size_t P, size_t Q, unsigned int Flags2>
void Linear::LUP< T, N, Flags >::Compute ( Matrix< T, P, Q, Flags2 >  A)
inline

Computes the LUP decomposition.

If A is not square or Q != N, then an exception is thrown.

Parameters
APxQ Matrix

Member Data Documentation

◆ L

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::LUP< T, N, Flags >::L

Lower triangular matrix with ones along the diagonal

◆ P

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::LUP< T, N, Flags >::P

Permutation matrix

◆ U

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::LUP< T, N, Flags >::U

Upper triangular matrix


The documentation for this struct was generated from the following file: