org.apache.commons.math.linear
Class FieldMatrixImplTest

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

public final class FieldMatrixImplTest
extends junit.framework.TestCase

Test cases for the Array2DRowFieldMatrix class.

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

Field Summary
protected  org.apache.commons.math.fraction.Fraction[][] bigSingular
           
protected  org.apache.commons.math.fraction.Fraction[][] detData
           
protected  org.apache.commons.math.fraction.Fraction[][] detData2
           
protected  double entryTolerance
           
protected  org.apache.commons.math.fraction.Fraction[][] id
           
protected  org.apache.commons.math.fraction.Fraction[][] luData
           
protected  org.apache.commons.math.fraction.Fraction[][] luDataLUDecomposition
           
protected  double normTolerance
           
protected  org.apache.commons.math.fraction.Fraction[] preMultTest
           
protected  org.apache.commons.math.fraction.Fraction[][] singular
           
protected  org.apache.commons.math.fraction.Fraction[][] subColumn1
           
protected  org.apache.commons.math.fraction.Fraction[][] subColumn3
           
protected  org.apache.commons.math.fraction.Fraction[][] subRow0
           
protected  org.apache.commons.math.fraction.Fraction[][] subRow3
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows00Cols33
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows01Cols23
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows02Cols13
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows03Cols12
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows03Cols123
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows20Cols123
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows23Cols00
           
protected  org.apache.commons.math.fraction.Fraction[][] subRows31Cols31
           
protected  org.apache.commons.math.fraction.Fraction[][] subTestData
           
protected  org.apache.commons.math.fraction.Fraction[][] testData
           
protected  org.apache.commons.math.fraction.Fraction[][] testData2
           
protected  org.apache.commons.math.fraction.Fraction[][] testData2T
           
protected  org.apache.commons.math.fraction.Fraction[] testDataCol3
           
protected  org.apache.commons.math.fraction.Fraction[][] testDataInv
           
protected  org.apache.commons.math.fraction.Fraction[][] testDataLU
           
protected  org.apache.commons.math.fraction.Fraction[][] testDataMinus
           
protected  org.apache.commons.math.fraction.Fraction[][] testDataPlus2
           
protected  org.apache.commons.math.fraction.Fraction[][] testDataPlusInv
           
protected  org.apache.commons.math.fraction.Fraction[] testDataRow1
           
protected  org.apache.commons.math.fraction.Fraction[] testVector
           
protected  org.apache.commons.math.fraction.Fraction[] testVector2
           
 
Constructor Summary
FieldMatrixImplTest(String name)
           
 
Method Summary
protected  org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> permuteRows(org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> matrix, int[] permutation)
          Returns the result of applying the given row permutation to the matrix
protected  void splitLU(org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> lu, org.apache.commons.math.fraction.Fraction[][] lowerData, org.apache.commons.math.fraction.Fraction[][] upperData)
          extracts the l and u matrices from compact lu representation
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 testGetColumn()
           
 void testGetColumnMatrix()
           
 void testGetColumnVector()
           
 void testGetEntry()
           
 void testGetRow()
           
 void testGetRowMatrix()
           
 void testGetRowVector()
           
 void testGetSubMatrix()
           
 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 testSerial()
           
 void testSetColumn()
           
 void testSetColumnMatrix()
           
 void testSetColumnVector()
           
 void testSetRow()
           
 void testSetRowMatrix()
           
 void testSetRowVector()
           
 void testSetSubMatrix()
           
 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 org.apache.commons.math.fraction.Fraction[][] id

testData

protected org.apache.commons.math.fraction.Fraction[][] testData

testDataLU

protected org.apache.commons.math.fraction.Fraction[][] testDataLU

testDataPlus2

protected org.apache.commons.math.fraction.Fraction[][] testDataPlus2

testDataMinus

protected org.apache.commons.math.fraction.Fraction[][] testDataMinus

testDataRow1

protected org.apache.commons.math.fraction.Fraction[] testDataRow1

testDataCol3

protected org.apache.commons.math.fraction.Fraction[] testDataCol3

testDataInv

protected org.apache.commons.math.fraction.Fraction[][] testDataInv

preMultTest

protected org.apache.commons.math.fraction.Fraction[] preMultTest

testData2

protected org.apache.commons.math.fraction.Fraction[][] testData2

testData2T

protected org.apache.commons.math.fraction.Fraction[][] testData2T

testDataPlusInv

protected org.apache.commons.math.fraction.Fraction[][] testDataPlusInv

luData

protected org.apache.commons.math.fraction.Fraction[][] luData

luDataLUDecomposition

protected org.apache.commons.math.fraction.Fraction[][] luDataLUDecomposition

singular

protected org.apache.commons.math.fraction.Fraction[][] singular

bigSingular

protected org.apache.commons.math.fraction.Fraction[][] bigSingular

detData

protected org.apache.commons.math.fraction.Fraction[][] detData

detData2

protected org.apache.commons.math.fraction.Fraction[][] detData2

testVector

protected org.apache.commons.math.fraction.Fraction[] testVector

testVector2

protected org.apache.commons.math.fraction.Fraction[] testVector2

subTestData

protected org.apache.commons.math.fraction.Fraction[][] subTestData

subRows02Cols13

protected org.apache.commons.math.fraction.Fraction[][] subRows02Cols13

subRows03Cols12

protected org.apache.commons.math.fraction.Fraction[][] subRows03Cols12

subRows03Cols123

protected org.apache.commons.math.fraction.Fraction[][] subRows03Cols123

subRows20Cols123

protected org.apache.commons.math.fraction.Fraction[][] subRows20Cols123

subRows31Cols31

protected org.apache.commons.math.fraction.Fraction[][] subRows31Cols31

subRows01Cols23

protected org.apache.commons.math.fraction.Fraction[][] subRows01Cols23

subRows23Cols00

protected org.apache.commons.math.fraction.Fraction[][] subRows23Cols00

subRows00Cols33

protected org.apache.commons.math.fraction.Fraction[][] subRows00Cols33

subRow0

protected org.apache.commons.math.fraction.Fraction[][] subRow0

subRow3

protected org.apache.commons.math.fraction.Fraction[][] subRow3

subColumn1

protected org.apache.commons.math.fraction.Fraction[][] subColumn1

subColumn3

protected org.apache.commons.math.fraction.Fraction[][] subColumn3

entryTolerance

protected double entryTolerance

normTolerance

protected double normTolerance
Constructor Detail

FieldMatrixImplTest

public FieldMatrixImplTest(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


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


testGetSubMatrix

public void testGetSubMatrix()

testCopySubMatrix

public void testCopySubMatrix()

testGetRowMatrix

public void testGetRowMatrix()

testSetRowMatrix

public void testSetRowMatrix()

testGetColumnMatrix

public void testGetColumnMatrix()

testSetColumnMatrix

public void testSetColumnMatrix()

testGetRowVector

public void testGetRowVector()

testSetRowVector

public void testSetRowVector()

testGetColumnVector

public void testGetColumnVector()

testSetColumnVector

public void testSetColumnVector()

testGetRow

public void testGetRow()

testSetRow

public void testSetRow()

testGetColumn

public void testGetColumn()

testSetColumn

public void testSetColumn()

testEqualsAndHashCode

public void testEqualsAndHashCode()

testToString

public void testToString()

testSetSubMatrix

public void testSetSubMatrix()
                      throws Exception
Throws:
Exception

testWalk

public void testWalk()

testSerial

public void testSerial()

splitLU

protected void splitLU(org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> lu,
                       org.apache.commons.math.fraction.Fraction[][] lowerData,
                       org.apache.commons.math.fraction.Fraction[][] upperData)
                throws org.apache.commons.math.linear.InvalidMatrixException
extracts the l and u matrices from compact lu representation

Throws:
org.apache.commons.math.linear.InvalidMatrixException

permuteRows

protected org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> permuteRows(org.apache.commons.math.linear.FieldMatrix<org.apache.commons.math.fraction.Fraction> matrix,
                                                                                                            int[] permutation)
Returns the result of applying the given row permutation to the matrix



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