org.apache.commons.math3.linear
Class MatrixUtilsTest

java.lang.Object
  extended by org.apache.commons.math3.linear.MatrixUtilsTest

public final class MatrixUtilsTest
extends Object

Test cases for the MatrixUtils class.

Version:
$Id: MatrixUtilsTest.java 1403587 2012-10-30 00:21:20Z erans $

Field Summary
protected  BigDecimal[] bigCol
           
protected  BigDecimal[][] bigColMatrix
           
protected  BigDecimal[] bigRow
           
protected  BigDecimal[][] bigRowMatrix
           
protected  double[] col
           
protected  double[][] colMatrix
           
protected  Fraction[] fractionCol
           
protected  Fraction[][] fractionColMatrix
           
protected  Fraction[] fractionRow
           
protected  Fraction[][] fractionRowMatrix
           
protected  double[] nullDoubleArray
           
protected  double[][] nullMatrix
           
protected  double[] row
           
protected  double[][] rowMatrix
           
protected  String[] stringCol
           
protected  String[][] stringColMatrix
           
protected  String[] stringRow
           
protected  String[][] stringRowMatrix
           
protected  double[][] testData
           
 
Constructor Summary
MatrixUtilsTest()
           
 
Method Summary
static Fraction[] asFraction(double[] data)
           
static Fraction[][] asFraction(double[][] data)
           
protected  void checkIdentityFieldMatrix(FieldMatrix<Fraction> m)
          Verifies that the matrix is an identity matrix
protected  void checkIdentityMatrix(RealMatrix m)
          Verifies that the matrix is an identity matrix
 void testBigFractionConverter()
           
 void testBlockInverse()
          This test should probably be replaced by one that could show whether this algorithm can sometimes perform better (precision- or performance-wise) than the direct inversion of the whole matrix.
 void testCheckSymmetric1()
           
 void testCheckSymmetric2()
           
 void testCreateColumnFieldMatrix()
           
 void testCreateColumnRealMatrix()
           
 void testcreateFieldIdentityMatrix()
           
 void testcreateFieldMatrix()
           
 void testCreateIdentityMatrix()
           
 void testCreateRealMatrix()
           
 void testCreateRowFieldMatrix()
           
 void testCreateRowRealMatrix()
           
 void testFractionConverter()
           
 void testIsSymmetric()
           
 void testIsSymmetricTolerance()
           
 void testSolveLowerTriangularSystem()
           
 void testSolveUpperTriangularSystem()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testData

protected double[][] testData

nullMatrix

protected double[][] nullMatrix

row

protected double[] row

bigRow

protected BigDecimal[] bigRow

stringRow

protected String[] stringRow

fractionRow

protected Fraction[] fractionRow

rowMatrix

protected double[][] rowMatrix

bigRowMatrix

protected BigDecimal[][] bigRowMatrix

stringRowMatrix

protected String[][] stringRowMatrix

fractionRowMatrix

protected Fraction[][] fractionRowMatrix

col

protected double[] col

bigCol

protected BigDecimal[] bigCol

stringCol

protected String[] stringCol

fractionCol

protected Fraction[] fractionCol

nullDoubleArray

protected double[] nullDoubleArray

colMatrix

protected double[][] colMatrix

bigColMatrix

protected BigDecimal[][] bigColMatrix

stringColMatrix

protected String[][] stringColMatrix

fractionColMatrix

protected Fraction[][] fractionColMatrix
Constructor Detail

MatrixUtilsTest

public MatrixUtilsTest()
Method Detail

testCreateRealMatrix

public void testCreateRealMatrix()

testcreateFieldMatrix

public void testcreateFieldMatrix()

testCreateRowRealMatrix

public void testCreateRowRealMatrix()

testCreateRowFieldMatrix

public void testCreateRowFieldMatrix()

testCreateColumnRealMatrix

public void testCreateColumnRealMatrix()

testCreateColumnFieldMatrix

public void testCreateColumnFieldMatrix()

checkIdentityMatrix

protected void checkIdentityMatrix(RealMatrix m)
Verifies that the matrix is an identity matrix


testCreateIdentityMatrix

public void testCreateIdentityMatrix()

checkIdentityFieldMatrix

protected void checkIdentityFieldMatrix(FieldMatrix<Fraction> m)
Verifies that the matrix is an identity matrix


testcreateFieldIdentityMatrix

public void testcreateFieldIdentityMatrix()

testBigFractionConverter

public void testBigFractionConverter()

testFractionConverter

public void testFractionConverter()

asFraction

public static final Fraction[][] asFraction(double[][] data)

asFraction

public static final Fraction[] asFraction(double[] data)

testSolveLowerTriangularSystem

public void testSolveLowerTriangularSystem()

testSolveUpperTriangularSystem

public void testSolveUpperTriangularSystem()

testBlockInverse

public void testBlockInverse()
This test should probably be replaced by one that could show whether this algorithm can sometimes perform better (precision- or performance-wise) than the direct inversion of the whole matrix.


testIsSymmetric

public void testIsSymmetric()

testIsSymmetricTolerance

public void testIsSymmetricTolerance()

testCheckSymmetric1

public void testCheckSymmetric1()

testCheckSymmetric2

public void testCheckSymmetric2()


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.