org.apache.commons.math3.linear
Class SparseFieldVectorTest

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

public class SparseFieldVectorTest
extends Object

Test cases for the SparseFieldVector class.

Version:
$Id: SparseFieldVectorTest.java 1244107 2012-02-14 16:17:55Z erans $

Field Summary
protected  Fraction[] dvec1
           
protected  double entryTolerance
           
protected  FractionField field
           
protected  Fraction[][] ma1
           
protected  Fraction[][] mat1
           
protected  double normTolerance
           
protected  Fraction[] vec_null
           
protected  Fraction[] vec1
           
protected  Fraction[] vec2
           
protected  Fraction[] vec3
           
protected  Fraction[] vec4
           
 
Constructor Summary
SparseFieldVectorTest()
           
 
Method Summary
protected  void assertClose(String msg, Fraction[] m, Fraction[] n, double tolerance)
          verifies that two vectors are close (sup norm)
protected  void assertEquals(String msg, Fraction[] m, Fraction[] n)
          verifies that two vectors are close (sup norm)
 void testBasicFunctions()
           
 void testMapFunctions()
           
 void testMisc()
           
 void testOuterProduct()
           
 void testPredicates()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ma1

protected Fraction[][] ma1

vec1

protected Fraction[] vec1

vec2

protected Fraction[] vec2

vec3

protected Fraction[] vec3

vec4

protected Fraction[] vec4

vec_null

protected Fraction[] vec_null

dvec1

protected Fraction[] dvec1

mat1

protected Fraction[][] mat1

entryTolerance

protected double entryTolerance

normTolerance

protected double normTolerance

field

protected FractionField field
Constructor Detail

SparseFieldVectorTest

public SparseFieldVectorTest()
Method Detail

testMapFunctions

public void testMapFunctions()
                      throws FractionConversionException
Throws:
FractionConversionException

testBasicFunctions

public void testBasicFunctions()
                        throws FractionConversionException
Throws:
FractionConversionException

testOuterProduct

public void testOuterProduct()

testMisc

public void testMisc()

testPredicates

public void testPredicates()

assertEquals

protected void assertEquals(String msg,
                            Fraction[] m,
                            Fraction[] n)
verifies that two vectors are close (sup 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.