|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.domains.ct.kernel.CTBaseIntegrator.History
protected class CTBaseIntegrator.History
The history information, state and derivatives, at equidistance past time points. This inner class is protected so that it can be tested.
Field Summary | |
---|---|
private int |
_capacity
|
private CTBaseIntegrator |
_container
|
private java.util.LinkedList<CTBaseIntegrator.DoubleDouble> |
_entries
|
private double |
_stepsize
|
Constructor Summary | |
---|---|
CTBaseIntegrator.History(CTBaseIntegrator container)
Construct a history object and associate it with the given integrator. |
Method Summary | |
---|---|
private double[] |
_extrapolation(double[] p1,
double[] p2,
double s)
|
private double[] |
_Hermite(double[] p1,
double[] p2,
double s)
|
void |
clear()
Remove all history information. |
int |
getCapacity()
Return the maximum capacity. |
double[] |
getEntry(int index)
Return the index-th entry in the history. |
int |
getValidEntryCount()
Return the number of valid entries. |
void |
pushEntry(double state,
double derivative)
Push the new state-derivative pair into the history. |
void |
rebalance(double currentStepSize)
Rebalance the history information with respect to the current step size, such that the information in the history list are equally distanced, and the distance is the current step size. |
void |
setCapacity(int capacity)
Set the history capacity. |
double[][] |
toDoubleArray()
Return the history information in an array format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private CTBaseIntegrator _container
private java.util.LinkedList<CTBaseIntegrator.DoubleDouble> _entries
private int _capacity
private double _stepsize
Constructor Detail |
---|
public CTBaseIntegrator.History(CTBaseIntegrator container)
container
- The container that contains this history object.Method Detail |
---|
public void clear()
public int getCapacity()
setCapacity(int)
public int getValidEntryCount()
public double[] getEntry(int index)
index
- The index of the entry.
public void pushEntry(double state, double derivative) throws IllegalActionException
state
- The state.derivative
- THe derivative of the state.
IllegalActionException
- If the capacity
of history is less than or equal to zero.public void rebalance(double currentStepSize) throws IllegalActionException
currentStepSize
- The current step size.
IllegalActionException
- If the director has an invalid
time resolution parameter.public void setCapacity(int capacity)
capacity
- The new capacity.getCapacity()
public double[][] toDoubleArray()
private double[] _Hermite(double[] p1, double[] p2, double s)
private double[] _extrapolation(double[] p1, double[] p2, double s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |