TMtx::LU Method

TMtx *LU(TMtx *Dst, TVecInt *P, TMtxType MtxType = TMtxType::mtGeneral);

LU, Cholesky or Bunch-Kaufmann factorization.

#NameTypeDescription
1DstTMtx *
2PTVecInt *
3MtxType = TMtxType::mtGeneralTMtxType
Remarks:

Performs a general LU, Cholesky or Bunch-Kaufmann factorization on the calling matrix and stores the results in lower triangular matrix L and upper triangular matrix U. The MtxType parameter defines which optimized method will be used to calculate the LU factorization. Depending on the type of the calling matrix the LU method will use specific optimized algorithm to perform the factorization. If you don't know the TMtxType of the calling matrix, you can omit the MtxType parameter (the default value mtGeneral will be used) or determine the type of matrix with the TMtx::DetectMtxType method. The following methods can be used to calculate the LU factorization:

  • Matrix type is mtSymmPosDef, mtHermPosDef, mtBandSymmPosDef, mtBandHermPosDef : Cholesky factorization.
  • mtSymmetric : Bunch-Kaufmann factorization.
  • mtHermitian : Bunch-Kaufmann factorization (only for complex calling matrix).
  • mtTriangle : or TMtx::UpperTriangle method.
  • mtGeneral, mtBandGeneral : general m x n matrix LU factorization.

Note
An exception will be raised if the calling matrix TMtx::Quadratic property is not true and matrix storage format is not banded.

See Also: TMtx::LUSolve
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler