## org.apache.commons.math.ode.sampling
Class DummyStepInterpolator

    java.lang.Object
      org.apache.commons.math.ode.sampling.AbstractStepInterpolator
          org.apache.commons.math.ode.sampling.DummyStepInterpolator

All Implemented Interfaces:
  java.io.Externalizable, java.io.Serializable, StepInterpolator

    public class DummyStepInterpolator

extends AbstractStepInterpolator

This class is a step interpolator that does nothing.

This class is used when the `"step handler"` set up by the user does not need step interpolation. It does not recompute the state when `setInterpolatedTime` is called. This implies the interpolated state is always the state at the end of the current step.

Since:
  1.2
Version:
  $Revision: 919479 $ $Date: 2010-03-05 11:35:56 -0500 (Fri, 05 Mar 2010) $
See Also:
  `StepHandler`, Serialized Form

Field Summary
`private double[]` `currentDerivative` Current derivative.
`private static long` `serialVersionUID` Serializable version identifier.

Fields inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolator
`currentState, currentTime, h, interpolatedDerivatives, interpolatedState, interpolatedTime, previousTime`

Constructor Summary
`DummyStepInterpolator()` Simple constructor.
`DummyStepInterpolator(double[] y, double[] yDot, boolean forward)` Simple constructor.
`DummyStepInterpolator(DummyStepInterpolator interpolator)` Copy constructor.

Method Summary
`protected void` `computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH)` Compute the state at the interpolated time.
`protected StepInterpolator` `doCopy()` Really copy the finalized instance.
`void` `readExternal(java.io.ObjectInput in)` Read the instance from an input channel.
`void` `writeExternal(java.io.ObjectOutput out)` Write the instance to an output channel.

Methods inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolator
`copy, doFinalize, finalizeStep, getCurrentTime, getInterpolatedDerivatives, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, shift, storeTime, writeBaseExternal`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  Serializable version identifier.

  See Also:
    Constant Field Values

### currentDerivative

    private double[] currentDerivative

  Current derivative.

Constructor Detail

### DummyStepInterpolator

    public DummyStepInterpolator()

  Simple constructor. This constructor builds an instance that is not usable yet, the `AbstractStepInterpolator.reinitialize` protected method should be called before using the instance in order to initialize the internal arrays. This constructor is used only in order to delay the initialization in some cases. As an example, the `EmbeddedRungeKuttaIntegrator` uses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy.

### DummyStepInterpolator

    public DummyStepInterpolator(double[] y,
                                 double[] yDot,
                                 boolean forward)

  Simple constructor.

  Parameters:
    `y` - reference to the integrator array holding the state at the end of the step
    `yDot` - reference to the integrator array holding the state derivative at some arbitrary point within the step
    `forward` - integration direction indicator

### DummyStepInterpolator

    public DummyStepInterpolator(DummyStepInterpolator interpolator)

  Copy constructor.

  Parameters:
    `interpolator` - interpolator to copy from. The copy is a deep copy: its arrays are separated from the original arrays of the instance

Method Detail

### doCopy

    protected StepInterpolator doCopy()

  Really copy the finalized instance.

  Specified by:
    `doCopy` in class `AbstractStepInterpolator`
  Returns:
    a copy of the finalized instance

### computeInterpolatedStateAndDerivatives

    protected void computeInterpolatedStateAndDerivatives(double theta,
                                                          double oneMinusThetaH)
                                                   throws DerivativeException

  Compute the state at the interpolated time. In this class, this method does nothing: the interpolated state is always the state at the end of the current step.

  Specified by:
    `computeInterpolatedStateAndDerivatives` in class `AbstractStepInterpolator`
  Parameters:
    `theta` - normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)
    `oneMinusThetaH` - time gap between the interpolated time and the current time
  Throws:
    `DerivativeException` - this exception is propagated to the caller if the underlying user function triggers one

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Write the instance to an output channel.

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Specified by:
    `writeExternal` in class `AbstractStepInterpolator`
  Parameters:
    `out` - output channel
  Throws:
    `java.io.IOException` - if the instance cannot be written

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException

  Read the instance from an input channel.

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Specified by:
    `readExternal` in class `AbstractStepInterpolator`
  Parameters:
    `in` - input channel
  Throws:
    `java.io.IOException` - if the instance cannot be read

Copyright (c) 2003-2011 Apache Software Foundation