org.apache.commons.math3.ode.sampling
Class StepNormalizerOutputTestBase

java.lang.Object
  extended by org.apache.commons.math3.ode.sampling.StepNormalizerOutputTestBase
All Implemented Interfaces:
FirstOrderDifferentialEquations, FixedStepHandler
Direct Known Subclasses:
StepNormalizerOutputOverlapTest, StepNormalizerOutputTest

public abstract class StepNormalizerOutputTestBase
extends Object
implements FirstOrderDifferentialEquations, FixedStepHandler

Base class for step normalizer output tests.


Constructor Summary
StepNormalizerOutputTestBase()
           
 
Method Summary
 void computeDerivatives(double t, double[] y, double[] yDot)
          
 int getDimension()
          
protected abstract  double getEnd()
          Returns the end time.
protected abstract  double[] getExpInc()
          Returns the expected normalized output time values for increment mode.
protected abstract  double[] getExpIncRev()
          Returns the expected reversed normalized output time values for increment mode.
protected abstract  double[] getExpMul()
          Returns the expected normalized output time values for multiples mode.
protected abstract  double[] getExpMulRev()
          Returns the expected reversed normalized output time values for multiples mode.
protected abstract  int[][] getO()
          Returns the offsets for the unit tests below, in the order they are given below.
protected abstract  double getStart()
          Returns the start time.
 void handleStep(double t, double[] y, double[] yDot, boolean isLast)
          
 void init(double t0, double[] y0, double t)
          
 void testIncBoth()
           
 void testIncBothRev()
           
 void testIncFirst()
           
 void testIncFirstRev()
           
 void testIncLast()
           
 void testIncLastRev()
           
 void testIncNeither()
           
 void testIncNeitherRev()
           
 void testMulBoth()
           
 void testMulBothRev()
           
 void testMulFirst()
           
 void testMulFirstRev()
           
 void testMulLast()
           
 void testMulLastRev()
           
 void testMulNeither()
           
 void testMulNeitherRev()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepNormalizerOutputTestBase

public StepNormalizerOutputTestBase()
Method Detail

getStart

protected abstract double getStart()
Returns the start time.

Returns:
the start time

getEnd

protected abstract double getEnd()
Returns the end time.

Returns:
the end time

getExpInc

protected abstract double[] getExpInc()
Returns the expected normalized output time values for increment mode.

Returns:
the expected normalized output time values for increment mode

getExpIncRev

protected abstract double[] getExpIncRev()
Returns the expected reversed normalized output time values for increment mode.

Returns:
the expected reversed normalized output time values for increment mode

getExpMul

protected abstract double[] getExpMul()
Returns the expected normalized output time values for multiples mode.

Returns:
the expected normalized output time values for multiples mode

getExpMulRev

protected abstract double[] getExpMulRev()
Returns the expected reversed normalized output time values for multiples mode.

Returns:
the expected reversed normalized output time values for multiples mode

getO

protected abstract int[][] getO()
Returns the offsets for the unit tests below, in the order they are given below. For each test, the left and right offsets are returned.

Returns:
the offsets for the unit tests below, in the order they are given below

testIncNeither

public void testIncNeither()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncNeitherRev

public void testIncNeitherRev()
                       throws DimensionMismatchException,
                              NumberIsTooSmallException,
                              MaxCountExceededException,
                              NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncFirst

public void testIncFirst()
                  throws DimensionMismatchException,
                         NumberIsTooSmallException,
                         MaxCountExceededException,
                         NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncFirstRev

public void testIncFirstRev()
                     throws DimensionMismatchException,
                            NumberIsTooSmallException,
                            MaxCountExceededException,
                            NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncLast

public void testIncLast()
                 throws DimensionMismatchException,
                        NumberIsTooSmallException,
                        MaxCountExceededException,
                        NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncLastRev

public void testIncLastRev()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncBoth

public void testIncBoth()
                 throws DimensionMismatchException,
                        NumberIsTooSmallException,
                        MaxCountExceededException,
                        NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testIncBothRev

public void testIncBothRev()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulNeither

public void testMulNeither()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulNeitherRev

public void testMulNeitherRev()
                       throws DimensionMismatchException,
                              NumberIsTooSmallException,
                              MaxCountExceededException,
                              NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulFirst

public void testMulFirst()
                  throws DimensionMismatchException,
                         NumberIsTooSmallException,
                         MaxCountExceededException,
                         NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulFirstRev

public void testMulFirstRev()
                     throws DimensionMismatchException,
                            NumberIsTooSmallException,
                            MaxCountExceededException,
                            NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulLast

public void testMulLast()
                 throws DimensionMismatchException,
                        NumberIsTooSmallException,
                        MaxCountExceededException,
                        NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulLastRev

public void testMulLastRev()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulBoth

public void testMulBoth()
                 throws DimensionMismatchException,
                        NumberIsTooSmallException,
                        MaxCountExceededException,
                        NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

testMulBothRev

public void testMulBothRev()
                    throws DimensionMismatchException,
                           NumberIsTooSmallException,
                           MaxCountExceededException,
                           NoBracketingException
Throws:
DimensionMismatchException
NumberIsTooSmallException
MaxCountExceededException
NoBracketingException

getDimension

public int getDimension()

Specified by:
getDimension in interface FirstOrderDifferentialEquations

computeDerivatives

public void computeDerivatives(double t,
                               double[] y,
                               double[] yDot)

Specified by:
computeDerivatives in interface FirstOrderDifferentialEquations

init

public void init(double t0,
                 double[] y0,
                 double t)

Specified by:
init in interface FixedStepHandler

handleStep

public void handleStep(double t,
                       double[] y,
                       double[] yDot,
                       boolean isLast)

Specified by:
handleStep in interface FixedStepHandler


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