|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.friend.simulation.SimulationStep
public class SimulationStep
Implements a single iteration in the simulation process.
This could actually be several iterations over the set of updateables
, depending on the value of
nIterate
.
Field Summary | |
---|---|
protected int |
nIterate
number of times to iterate for a single step |
protected long |
previousTime
Time during previous step. |
protected float |
speed
The scalar 'real-time' will be multiplied with. |
protected float |
timeScale
Time scale. |
protected Collection |
updateables
The collection of updateable objects. |
Constructor Summary | |
---|---|
SimulationStep(Collection updateables,
float speed)
Creates a new instance of SimulationStep with the
specified Collection of
Updateable instances and a specified
speed multiplier. |
Method Summary | |
---|---|
int |
getNumberOfIterationsPerStep()
|
Collection |
getUpdateables()
Returns the collection of Updateable . |
void |
init()
(Re-)Initializes this instance at the begin of the simulation. |
void |
setNumberOfIterationsPerStep(int n)
|
void |
step()
Makes all the cells first Updateable.compute(float) , and then all the cells then Updateable.update()
for a single simulation step. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int nIterate
protected long previousTime
protected float timeScale
protected Collection updateables
protected float speed
Constructor Detail |
---|
public SimulationStep(Collection updateables, float speed)
SimulationStep
with the
specified Collection
of
Updateable
instances and a specified
speed multiplier.
updateables
- The updateable collection.speed
- The speed multiplier relative to 'real-time'.Method Detail |
---|
public void setNumberOfIterationsPerStep(int n)
n
- the number of iterations per stepnIterate
public int getNumberOfIterationsPerStep()
nIterate
public void init()
public void step()
Updateable.compute(float)
, and then all the cells then Updateable.update()
for a single simulation step.
public Collection getUpdateables()
Updateable
.
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |