org.apache.commons.math.linear
Class SparseFieldVectorTest

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

public class SparseFieldVectorTest
extends junit.framework.TestCase

Test cases for the SparseFieldVector class.

Version:
$Revision: 799857 $ $Date: 2009-08-01 09:07:12 -0400 (Sat, 01 Aug 2009) $

Field Summary
protected  org.apache.commons.math.fraction.Fraction[] dvec1
           
protected  double entryTolerance
           
protected  org.apache.commons.math.fraction.FractionField field
           
protected  org.apache.commons.math.fraction.Fraction[][] ma1
           
protected  org.apache.commons.math.fraction.Fraction[][] mat1
           
protected  double normTolerance
           
protected  org.apache.commons.math.fraction.Fraction[] vec_null
           
protected  org.apache.commons.math.fraction.Fraction[] vec1
           
protected  org.apache.commons.math.fraction.Fraction[] vec2
           
protected  org.apache.commons.math.fraction.Fraction[] vec3
           
protected  org.apache.commons.math.fraction.Fraction[] vec4
           
 
Constructor Summary
SparseFieldVectorTest()
           
 
Method Summary
protected  void assertClose(String msg, org.apache.commons.math.fraction.Fraction[] m, org.apache.commons.math.fraction.Fraction[] n, double tolerance)
          verifies that two vectors are close (sup norm)
protected  void assertEquals(String msg, org.apache.commons.math.fraction.Fraction[] m, org.apache.commons.math.fraction.Fraction[] n)
          verifies that two vectors are close (sup norm)
 void testBasicFunctions()
           
 void testMapFunctions()
           
 void testMisc()
           
 void testPredicates()
           
 
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

ma1

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

vec1

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

vec2

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

vec3

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

vec4

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

vec_null

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

dvec1

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

mat1

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

entryTolerance

protected double entryTolerance

normTolerance

protected double normTolerance

field

protected org.apache.commons.math.fraction.FractionField field
Constructor Detail

SparseFieldVectorTest

public SparseFieldVectorTest()
Method Detail

testMapFunctions

public void testMapFunctions()
                      throws org.apache.commons.math.fraction.FractionConversionException
Throws:
org.apache.commons.math.fraction.FractionConversionException

testBasicFunctions

public void testBasicFunctions()
                        throws org.apache.commons.math.fraction.FractionConversionException
Throws:
org.apache.commons.math.fraction.FractionConversionException

testMisc

public void testMisc()

testPredicates

public void testPredicates()

assertEquals

protected void assertEquals(String msg,
                            org.apache.commons.math.fraction.Fraction[] m,
                            org.apache.commons.math.fraction.Fraction[] n)
verifies that two vectors are close (sup norm)


assertClose

protected void assertClose(String msg,
                           org.apache.commons.math.fraction.Fraction[] m,
                           org.apache.commons.math.fraction.Fraction[] n,
                           double tolerance)
verifies that two vectors are close (sup norm)



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