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 whensetInterpolatedTimeis called. This implies the interpolated state is always the state at the end of the current step.- Since:
- 1.2
- See Also:
StepHandler, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DummyStepInterpolator()Simple constructor.DummyStepInterpolator(double[] y, double[] yDot, boolean forward)Simple constructor.DummyStepInterpolator(DummyStepInterpolator interpolator)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreadExternal(java.io.ObjectInput in)Read the instance from an input channel.voidwriteExternal(java.io.ObjectOutput out)Write the instance to an output channel.-
Methods inherited from class org.apache.commons.math.ode.sampling.AbstractStepInterpolator
copy, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, shift, storeTime
-
-
-
-
Constructor Detail
-
DummyStepInterpolator
public DummyStepInterpolator()
Simple constructor. This constructor builds an instance that is not usable yet, theAbstractStepInterpolator.reinitializeprotected 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, theEmbeddedRungeKuttaIntegratoruses 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 stepyDot- reference to the integrator array holding the state derivative at some arbitrary point within the stepforward- 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
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite the instance to an output channel.- Specified by:
writeExternalin interfacejava.io.Externalizable- Specified by:
writeExternalin classAbstractStepInterpolator- 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.IOExceptionRead the instance from an input channel.- Specified by:
readExternalin interfacejava.io.Externalizable- Specified by:
readExternalin classAbstractStepInterpolator- Parameters:
in- input channel- Throws:
java.io.IOException- if the instance cannot be read
-
-