|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.graphstream.boids.DemographicManager
public class DemographicManager
Handles the appearance and disappearance of boids.
| Nested Class Summary | |
|---|---|
static class |
DemographicManager.SpeciesDemographicManager
A demographic manager that handles boids species. |
| Constructor Summary | |
|---|---|
DemographicManager(BoidGraph ctx)
|
|
DemographicManager(BoidGraph ctx,
Probability reproduceProbability,
Probability deathProbability)
|
|
| Method Summary | |
|---|---|
void |
boidAdded(Boid boid)
One boid was added. |
void |
boidDeleted(Boid boid)
One boid was removed. |
void |
release()
Release this manager, and remove as a listener for the graph. |
void |
setDeathProbability(Probability dp)
Set the probability function for boid death. |
void |
setReproduceCondition(Probability rc)
Set the probability function for boid reproduction. |
void |
step(double time)
Call this method after each step of boid computation, to add or remove boids according to reproduction rules. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DemographicManager(BoidGraph ctx)
public DemographicManager(BoidGraph ctx,
Probability reproduceProbability,
Probability deathProbability)
| Method Detail |
|---|
public void setReproduceCondition(Probability rc)
rc - The new probability.public void setDeathProbability(Probability dp)
dp - The new probability.public void boidAdded(Boid boid)
BoidGraphListener
boidAdded in interface BoidGraphListenerboid - The added boid.public void boidDeleted(Boid boid)
BoidGraphListener
boidDeleted in interface BoidGraphListenerboid - The removed boid.public void step(double time)
step in interface BoidGraphListenertime - The current iteration time.public void release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||