linear_algebra
Class CholTest

java.lang.Object
  |
  +--linear_algebra.CholTest

public class CholTest
extends java.lang.Object

This class tests the Cholesky decomposition class and the Triangular solve/invert class. It

  1. Randomly generates numbers between randlow and randhigh and fills a lower triangular matrix R with them. Note that randlow and randhigh should be of the same sign. Otherwise it would be possible for R not to be of full rank.
  2. Obtains the positive definite matrix A = RR´.
  3. Randomly generates a vector x.
  4. Calculates the vector b = Ax.
  5. Performs a Cholesky decomposition of A in an effort to recover R. (This tests Cholesky.factorPosDef.)
  6. Solves the system Az = b in an effort to recover x. (This tests Cholesky.solvePosDef, Triangular.solveLower, and Triangular.solveUpper.)
  7. Obtains an estimate of A^{-1} and compares A^{-1}A with the identity matrix. (This tests Cholesky.invertPosDef and Triangular.invertLower.)
  8. Obtains the inverse of an upper triangular matrix and compares the product of this inverse and the original upper triangular matrix with the identity matrix. (This tests Triangular.invertUpper.)


Constructor Summary
CholTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CholTest

public CholTest()
Method Detail

main

public static void main(java.lang.String[] args)