org.apache.commons.math.linear
Class BlockRealMatrixTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.linear.BlockRealMatrixTest
All Implemented Interfaces:
junit.framework.Test

public final class BlockRealMatrixTest
extends junit.framework.TestCase

Test cases for the BlockRealMatrix class.

Version:
$Revision: 790243 $ $Date: 2009-07-01 12:03:28 -0400 (Wed, 01 Jul 2009) $

Field Summary
protected  double[][] bigSingular
           
protected  double[][] detData
           
protected  double[][] detData2
           
protected  double entryTolerance
           
protected  double[][] id
           
protected  double[][] luData
           
protected  double[][] luDataLUDecomposition
           
protected  double normTolerance
           
protected  double[] preMultTest
           
protected  double[][] singular
           
protected  double[][] subColumn1
           
protected  double[][] subColumn3
           
protected  double[][] subRow0
           
protected  double[][] subRow3
           
protected  double[][] subRows00Cols33
           
protected  double[][] subRows01Cols23
           
protected  double[][] subRows02Cols13
           
protected  double[][] subRows03Cols12
           
protected  double[][] subRows03Cols123
           
protected  double[][] subRows20Cols123
           
protected  double[][] subRows23Cols00
           
protected  double[][] subRows31Cols31
           
protected  double[][] subTestData
           
protected  double[][] testData
           
protected  double[][] testData2
           
protected  double[][] testData2T
           
protected  double[] testDataCol3
           
protected  double[][] testDataInv
           
protected  double[][] testDataLU
           
protected  double[][] testDataMinus
           
protected  double[][] testDataPlus2
           
protected  double[][] testDataPlusInv
           
protected  double[] testDataRow1
           
protected  double[] testVector
           
protected  double[] testVector2
           
 
Constructor Summary
BlockRealMatrixTest(String name)
           
 
Method Summary
protected  void assertClose(double[] m, double[] n, double tolerance)
          verifies that two vectors are close (sup norm)
protected  void assertClose(org.apache.commons.math.linear.RealMatrix m, org.apache.commons.math.linear.RealMatrix n, double tolerance)
          verifies that two matrices are close (1-norm)
static junit.framework.Test suite()
           
 void testAdd()
          test add
 void testAddFail()
          test add failure
 void testCopyFunctions()
          test copy functions
 void testCopySubMatrix()
           
 void testDimensions()
          test dimensions
 void testEqualsAndHashCode()
           
 void testExamples()
          test examples in user guide
 void testFrobeniusNorm()
          test Frobenius norm
 void testGetColumn()
           
 void testGetColumnMatrix()
           
 void testGetColumnVector()
           
 void testGetEntry()
           
 void testGetRow()
           
 void testGetRowMatrix()
           
 void testGetRowVector()
           
 void testGetSetColumnLarge()
           
 void testGetSetColumnMatrixLarge()
           
 void testGetSetColumnVectorLarge()
           
 void testGetSetMatrixLarge()
           
 void testGetSetRowLarge()
           
 void testGetSetRowMatrixLarge()
           
 void testGetSetRowVectorLarge()
           
 void testGetSubMatrix()
           
 void testGetVectors()
           
 void testMath209()
          test issue MATH-209
 void testMultiply()
          test multiply
 void testMultiply2()
           
 void testNorm()
          test norm
 void testOperate()
          test operate
 void testOperateLarge()
           
 void testOperatePremultiplyLarge()
           
 void testPlusMinus()
          test m-n = m + -n
 void testPremultiply()
           
 void testPremultiplyVector()
          test preMultiply by vector
 void testScalarAdd()
          test scalarAdd
 void testSerial()
           
 void testSetColumn()
           
 void testSetColumnMatrix()
           
 void testSetColumnVector()
           
 void testSetRow()
           
 void testSetRowMatrix()
           
 void testSetRowVector()
           
 void testSetSubMatrix()
           
 void testSeveralBlocks()
           
 void testToString()
           
 void testTrace()
          test trace
 void testTranspose()
          test transpose
 void testWalk()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected double[][] id

testData

protected double[][] testData

testDataLU

protected double[][] testDataLU

testDataPlus2

protected double[][] testDataPlus2

testDataMinus

protected double[][] testDataMinus

testDataRow1

protected double[] testDataRow1

testDataCol3

protected double[] testDataCol3

testDataInv

protected double[][] testDataInv

preMultTest

protected double[] preMultTest

testData2

protected double[][] testData2

testData2T

protected double[][] testData2T

testDataPlusInv

protected double[][] testDataPlusInv

luData

protected double[][] luData

luDataLUDecomposition

protected double[][] luDataLUDecomposition

singular

protected double[][] singular

bigSingular

protected double[][] bigSingular

detData

protected double[][] detData

detData2

protected double[][] detData2

testVector

protected double[] testVector

testVector2

protected double[] testVector2

subTestData

protected double[][] subTestData

subRows02Cols13

protected double[][] subRows02Cols13

subRows03Cols12

protected double[][] subRows03Cols12

subRows03Cols123

protected double[][] subRows03Cols123

subRows20Cols123

protected double[][] subRows20Cols123

subRows31Cols31

protected double[][] subRows31Cols31

subRows01Cols23

protected double[][] subRows01Cols23

subRows23Cols00

protected double[][] subRows23Cols00

subRows00Cols33

protected double[][] subRows00Cols33

subRow0

protected double[][] subRow0

subRow3

protected double[][] subRow3

subColumn1

protected double[][] subColumn1

subColumn3

protected double[][] subColumn3

entryTolerance

protected double entryTolerance

normTolerance

protected double normTolerance
Constructor Detail

BlockRealMatrixTest

public BlockRealMatrixTest(String name)
Method Detail

suite

public static junit.framework.Test suite()

testDimensions

public void testDimensions()
test dimensions


testCopyFunctions

public void testCopyFunctions()
test copy functions


testAdd

public void testAdd()
test add


testAddFail

public void testAddFail()
test add failure


testNorm

public void testNorm()
test norm


testFrobeniusNorm

public void testFrobeniusNorm()
test Frobenius norm


testPlusMinus

public void testPlusMinus()
test m-n = m + -n


testMultiply

public void testMultiply()
test multiply


testSeveralBlocks

public void testSeveralBlocks()

testMultiply2

public void testMultiply2()

testTrace

public void testTrace()
test trace


testScalarAdd

public void testScalarAdd()
test scalarAdd


testOperate

public void testOperate()
test operate


testOperateLarge

public void testOperateLarge()

testOperatePremultiplyLarge

public void testOperatePremultiplyLarge()

testMath209

public void testMath209()
test issue MATH-209


testTranspose

public void testTranspose()
test transpose


testPremultiplyVector

public void testPremultiplyVector()
test preMultiply by vector


testPremultiply

public void testPremultiply()

testGetVectors

public void testGetVectors()

testGetEntry

public void testGetEntry()

testExamples

public void testExamples()
test examples in user guide


testGetSubMatrix

public void testGetSubMatrix()

testGetSetMatrixLarge

public void testGetSetMatrixLarge()

testCopySubMatrix

public void testCopySubMatrix()

testGetRowMatrix

public void testGetRowMatrix()

testSetRowMatrix

public void testSetRowMatrix()

testGetSetRowMatrixLarge

public void testGetSetRowMatrixLarge()

testGetColumnMatrix

public void testGetColumnMatrix()

testSetColumnMatrix

public void testSetColumnMatrix()

testGetSetColumnMatrixLarge

public void testGetSetColumnMatrixLarge()

testGetRowVector

public void testGetRowVector()

testSetRowVector

public void testSetRowVector()

testGetSetRowVectorLarge

public void testGetSetRowVectorLarge()

testGetColumnVector

public void testGetColumnVector()

testSetColumnVector

public void testSetColumnVector()

testGetSetColumnVectorLarge

public void testGetSetColumnVectorLarge()

testGetRow

public void testGetRow()

testSetRow

public void testSetRow()

testGetSetRowLarge

public void testGetSetRowLarge()

testGetColumn

public void testGetColumn()

testSetColumn

public void testSetColumn()

testGetSetColumnLarge

public void testGetSetColumnLarge()

testEqualsAndHashCode

public void testEqualsAndHashCode()

testToString

public void testToString()

testSetSubMatrix

public void testSetSubMatrix()
                      throws Exception
Throws:
Exception

testWalk

public void testWalk()

testSerial

public void testSerial()

assertClose

protected void assertClose(org.apache.commons.math.linear.RealMatrix m,
                           org.apache.commons.math.linear.RealMatrix n,
                           double tolerance)
verifies that two matrices are close (1-norm)


assertClose

protected void assertClose(double[] m,
                           double[] n,
                           double tolerance)
verifies that two vectors are close (sup norm)



Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.