org.apache.commons.math3.linear
Class SparseFieldMatrixTest

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

public class SparseFieldMatrixTest
extends Object

Test cases for the SparseFieldMatrix class.

Version:
$Id: SparseFieldMatrixTest.java 1364030 2012-07-21 01:10:04Z erans $

Field Summary
protected  Fraction[][] bigSingular
           
protected  Fraction[][] detData
           
protected  Fraction[][] detData2
           
protected  double entryTolerance
           
protected  Field<Fraction> field
           
protected  Fraction[][] id
           
protected  Fraction[][] luData
           
protected  Fraction[][] luDataLUDecomposition
           
protected  double normTolerance
           
protected  Fraction[] preMultTest
           
protected  Fraction[][] singular
           
protected  Fraction[][] subColumn1
           
protected  Fraction[][] subColumn3
           
protected  Fraction[][] subRow0
           
protected  Fraction[][] subRow3
           
protected  Fraction[][] subRows00Cols33
           
protected  Fraction[][] subRows01Cols23
           
protected  Fraction[][] subRows02Cols13
           
protected  Fraction[][] subRows03Cols12
           
protected  Fraction[][] subRows03Cols123
           
protected  Fraction[][] subRows20Cols123
           
protected  Fraction[][] subRows23Cols00
           
protected  Fraction[][] subRows31Cols31
           
protected  Fraction[][] subTestData
           
protected  Fraction[][] testData
           
protected  Fraction[][] testData2
           
protected  Fraction[][] testData2T
           
protected  Fraction[] testDataCol3
           
protected  Fraction[][] testDataInv
           
protected  Fraction[][] testDataLU
           
protected  Fraction[][] testDataMinus
           
protected  Fraction[][] testDataPlus2
           
protected  Fraction[][] testDataPlusInv
           
protected  Fraction[] testDataRow1
           
protected  Fraction[] testVector
           
protected  Fraction[] testVector2
           
 
Constructor Summary
SparseFieldMatrixTest()
           
 
Method Summary
protected  void assertClose(String msg, FieldMatrix<Fraction> m, FieldMatrix<Fraction> n, double tolerance)
          verifies that two matrices are close (1-norm)
protected  void assertClose(String msg, Fraction[] m, Fraction[] n, double tolerance)
          verifies that two vectors are close (sup norm)
 void testAdd()
          test add
 void testAddFail()
          test add failure
 void testCopyFunctions()
          test copy functions
 void testDimensions()
          test dimensions
 void testEqualsAndHashCode()
           
 void testExamples()
          test examples in user guide
 void testGetColumnMatrix()
           
 void testGetColumnVector()
           
 void testGetEntry()
           
 void testGetRowMatrix()
           
 void testGetRowVector()
           
 void testGetVectors()
           
 void testMath209()
          test issue MATH-209
 void testMultiply()
          test multiply
 void testMultiply2()
           
 void testOperate()
          test operate
 void testPlusMinus()
          test m-n = m + -n
 void testPremultiply()
           
 void testPremultiplyVector()
          test preMultiply by vector
 void testScalarAdd()
          test sclarAdd
 void testSetSubMatrix()
           
 void testSubMatrix()
           
 void testTrace()
          test trace
 void testTranspose()
          test transpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Fraction[][] id

testData

protected Fraction[][] testData

testDataLU

protected Fraction[][] testDataLU

testDataPlus2

protected Fraction[][] testDataPlus2

testDataMinus

protected Fraction[][] testDataMinus

testDataRow1

protected Fraction[] testDataRow1

testDataCol3

protected Fraction[] testDataCol3

testDataInv

protected Fraction[][] testDataInv

preMultTest

protected Fraction[] preMultTest

testData2

protected Fraction[][] testData2

testData2T

protected Fraction[][] testData2T

testDataPlusInv

protected Fraction[][] testDataPlusInv

luData

protected Fraction[][] luData

luDataLUDecomposition

protected Fraction[][] luDataLUDecomposition

singular

protected Fraction[][] singular

bigSingular

protected Fraction[][] bigSingular

detData

protected Fraction[][] detData

detData2

protected Fraction[][] detData2

testVector

protected Fraction[] testVector

testVector2

protected Fraction[] testVector2

subTestData

protected Fraction[][] subTestData

subRows02Cols13

protected Fraction[][] subRows02Cols13

subRows03Cols12

protected Fraction[][] subRows03Cols12

subRows03Cols123

protected Fraction[][] subRows03Cols123

subRows20Cols123

protected Fraction[][] subRows20Cols123

subRows31Cols31

protected Fraction[][] subRows31Cols31

subRows01Cols23

protected Fraction[][] subRows01Cols23

subRows23Cols00

protected Fraction[][] subRows23Cols00

subRows00Cols33

protected Fraction[][] subRows00Cols33

subRow0

protected Fraction[][] subRow0

subRow3

protected Fraction[][] subRow3

subColumn1

protected Fraction[][] subColumn1

subColumn3

protected Fraction[][] subColumn3

entryTolerance

protected double entryTolerance

normTolerance

protected double normTolerance

field

protected Field<Fraction> field
Constructor Detail

SparseFieldMatrixTest

public SparseFieldMatrixTest()
Method Detail

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


testPlusMinus

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


testMultiply

public void testMultiply()
test multiply


testMultiply2

public void testMultiply2()

testTrace

public void testTrace()
test trace


testScalarAdd

public void testScalarAdd()
test sclarAdd


testOperate

public void testOperate()
test operate


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


testSubMatrix

public void testSubMatrix()

testGetRowMatrix

public void testGetRowMatrix()

testGetColumnMatrix

public void testGetColumnMatrix()

testGetRowVector

public void testGetRowVector()

testGetColumnVector

public void testGetColumnVector()

testEqualsAndHashCode

public void testEqualsAndHashCode()

testSetSubMatrix

public void testSetSubMatrix()

assertClose

protected void assertClose(String msg,
                           FieldMatrix<Fraction> m,
                           FieldMatrix<Fraction> n,
                           double tolerance)
verifies that two matrices are close (1-norm)


assertClose

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



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