IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Unit tests for matrix decompositions. More...
Public Member Functions | |
void | LU_MatrixBase () |
Unit test for testing correctness of the LU decomposition of an invertible matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | LDLT_MatrixBase () |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | LDLT_Indefinite_MatrixBase () |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | Cholesky_MatrixBase () |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive definite matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | Cholesky_PositiveSemidefinite_MatrixBase () |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive SEMIdefinite matrix. Decomposition in this case must throw an exception of type InvalidOperationException. More... | |
void | QrGrammSchmidt_MatrixBase () |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified. More... | |
void | Qr_MatrixBase () |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified. More... | |
void | LU_MatrixBase () |
Unit test for testing correctness of the LU decomposition of an invertible matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | LDLT_MatrixBase () |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | LDLT_Indefinite_MatrixBase () |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | Cholesky_MatrixBase () |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive definite matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant). More... | |
void | Cholesky_PositiveSemidefinite_MatrixBase () |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive SEMIdefinite matrix. Decomposition in this case must throw an exception of type InvalidOperationException. More... | |
void | QrGrammSchmidt_MatrixBase () |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified. More... | |
void | Qr_MatrixBase () |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified. More... | |
Unit tests for matrix decompositions.
$A Igor Dec14 Mar15;
|
inline |
Unit test for testing correctness of the LU decomposition of an invertible matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, IG.Num.Matrix.Identity(), IG.Num.MatrixBase.LuDecompose(), IG.Num.MatrixBase.LuDeterminant(), IG.Num.MatrixBase.LuExtractLower(), IG.Num.MatrixBase.LuExtractUpper(), IG.Num.MatrixBase.LuInverse(), IG.Num.MatrixBase.LuSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomInvertible(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), IG.Num.MatrixBase.Subtract(), and IG.Num.MatrixBase.UnPermute().
|
inline |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, IG.Num.MatrixBase.IsSymmetric(), IG.Num.MatrixBase.LdltDecompose(), IG.Num.MatrixBase.LdltDeterminant(), IG.Num.MatrixBase.LdltExtractDiagonal(), IG.Num.MatrixBase.LdltExtractLower(), IG.Num.MatrixBase.LdltExtractUpper(), IG.Num.MatrixBase.LdltInverse(), IG.Num.MatrixBase.LdltSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomPositiveDefiniteSymmetric(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, IG.Num.MatrixBase.IsSymmetric(), IG.Num.MatrixBase.LdltDecompose(), IG.Num.MatrixBase.LdltDeterminant(), IG.Num.MatrixBase.LdltExtractDiagonal(), IG.Num.MatrixBase.LdltExtractLower(), IG.Num.MatrixBase.LdltExtractUpper(), IG.Num.MatrixBase.LdltInverse(), IG.Num.MatrixBase.LdltSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.MultiplyMatMatTranspPlain(), IG.Num.IRandomGenerator.NextDouble(), IG.Num.MatrixBase.SetIdentity(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive definite matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, IG.Num.MatrixBase.CholeskyDecompose(), IG.Num.MatrixBase.CholeskyDeterminant(), IG.Num.MatrixBase.CholeskyExtractLower(), IG.Num.MatrixBase.CholeskyExtractUpper(), IG.Num.MatrixBase.CholeskyInverse(), IG.Num.MatrixBase.CholeskySolve(), IG.Num.MatrixBase.IsSymmetric(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomPositiveDefiniteSymmetric(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive SEMIdefinite matrix. Decomposition in this case must throw an exception of type InvalidOperationException.
References IG.Num.A, IG.Num.MatrixBase.CholeskyDecompose(), IG.Num.MatrixBase.CholeskyExtractLower(), IG.Num.MatrixBase.CholeskyExtractUpper(), IG.Num.MatrixBase.IsSymmetric(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.MultiplyMatTranspPlain(), IG.Num.IRandomGenerator.NextInclusive(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandom(), and IG.Num.MatrixBase.Subtract().
|
inline |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified.
References IG.Num.A, IG.Num.MatrixBase.Multiply(), IG.Num.VectorBase.Norm2Static(), IG.Num.MatrixBase.QrDecomposeGrammSchmidt(), IG.Num.MatrixBase.QrInverse(), IG.Num.MatrixBase.QrSolve(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IVector.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified.
References IG.Num.A, IG.Num.MatrixBase.Multiply(), IG.Num.VectorBase.Norm2Static(), IG.Num.MatrixBase.QrDecompose(), IG.Num.MatrixBase.QrInverse(), IG.Num.MatrixBase.QrSolve(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IVector.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the LU decomposition of an invertible matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), IG.Num.Matrix.Identity(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.LuDecompose(), IG.Num.MatrixBase.LuDeterminant(), IG.Num.MatrixBase.LuExtractLower(), IG.Num.MatrixBase.LuExtractUpper(), IG.Num.MatrixBase.LuInverse(), IG.Num.MatrixBase.LuSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomInvertible(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), IG.Num.MatrixBase.Subtract(), and IG.Num.MatrixBase.UnPermute().
|
inline |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), IG.Num.MatrixBase.IsSymmetric(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.LdltDecompose(), IG.Num.MatrixBase.LdltDeterminant(), IG.Num.MatrixBase.LdltExtractDiagonal(), IG.Num.MatrixBase.LdltExtractLower(), IG.Num.MatrixBase.LdltExtractUpper(), IG.Num.MatrixBase.LdltInverse(), IG.Num.MatrixBase.LdltSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomPositiveDefiniteSymmetric(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the LDLT decomposition of a symmetric matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), IG.Num.MatrixBase.IsSymmetric(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.LdltDecompose(), IG.Num.MatrixBase.LdltDeterminant(), IG.Num.MatrixBase.LdltExtractDiagonal(), IG.Num.MatrixBase.LdltExtractLower(), IG.Num.MatrixBase.LdltExtractUpper(), IG.Num.MatrixBase.LdltInverse(), IG.Num.MatrixBase.LdltSolve(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.MultiplyMatMatTranspPlain(), IG.Num.IRandomGenerator.NextDouble(), IG.Num.MatrixBase.SetIdentity(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive definite matrix and of operations performed with such decomposition (solution of system of equations, matrix inversion, determinant).
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), IG.Num.MatrixBase.CholeskyDecompose(), IG.Num.MatrixBase.CholeskyDeterminant(), IG.Num.MatrixBase.CholeskyExtractLower(), IG.Num.MatrixBase.CholeskyExtractUpper(), IG.Num.MatrixBase.CholeskyInverse(), IG.Num.MatrixBase.CholeskySolve(), IG.Num.MatrixBase.IsSymmetric(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IMatrix.SetRandom(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomPositiveDefiniteSymmetric(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Unit test for testing correctness of the Cholesky (LLT) decomposition of a symmetric positive SEMIdefinite matrix. Decomposition in this case must throw an exception of type InvalidOperationException.
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), IG.Num.MatrixBase.CholeskyDecompose(), IG.Num.MatrixBase.CholeskyExtractLower(), IG.Num.MatrixBase.CholeskyExtractUpper(), IG.Num.MatrixBase.IsSymmetric(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.Multiply(), IG.Num.MatrixBase.MultiplyMatTranspPlain(), IG.Num.IRandomGenerator.NextInclusive(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.Subtract(), and NUnit.Framework.Assert.Throws().
|
inline |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified.
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.Multiply(), IG.Num.VectorBase.Norm2Static(), IG.Num.MatrixBase.QrDecomposeGrammSchmidt(), IG.Num.MatrixBase.QrInverse(), IG.Num.MatrixBase.QrSolve(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IVector.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().
|
inline |
Verifies correctness of the QR decomposition performed by the Gramm-Schmidt method, on a 6 by 6 randomly generated matrix. The product and orthonormality of the Q factor are verified.
References IG.Num.A, NUnit.Framework.Assert.AreEqual(), NUnit.Framework.Assert.IsTrue(), IG.Num.MatrixBase.Multiply(), IG.Num.VectorBase.Norm2Static(), IG.Num.MatrixBase.QrDecompose(), IG.Num.MatrixBase.QrInverse(), IG.Num.MatrixBase.QrSolve(), IG.Num.MatrixBase.SetIdentity(), IG.Num.IVector.SetRandom(), IG.Num.MatrixBase.SetRandom(), IG.Num.MatrixBase.SetZero(), IG.Num.VectorBase.Subtract(), and IG.Num.MatrixBase.Subtract().