edu.brook.ascape.rule
Class Diffusion
java.lang.Object
|
+--edu.brook.ascape.model.AscapeObject
|
+--edu.brook.ascape.rule.Rule
|
+--edu.brook.ascape.rule.ExecuteThenUpdate
|
+--edu.brook.ascape.rule.Diffusion
- Direct Known Subclasses:
- ParameterizedDiffusion
- public abstract class Diffusion
- extends ExecuteThenUpdate
A rule causing some agent value to diffuse to its neighbors.
- Since:
- 1.0
- Version:
- 1.0
- See Also:
- Serialized Form
| Methods inherited from class edu.brook.ascape.model.AscapeObject |
clone,
getName,
getRandom,
getRandomSeed,
randomInRange,
randomInRange,
randomIs,
randomToLimit,
reseed,
setName,
setRandom,
setRandomSeed,
toString |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Diffusion
public Diffusion()
getDiffusionValue
public abstract float getDiffusionValue(Agent agent)
- Override with a call to the getter of the value to diffuse.
setDiffusionValue
public abstract void setDiffusionValue(Agent agent,
float value)
- Override with a call to the setter of the diffused value.
execute
public void execute(Agent agent)
- Calculate and store diffusion value to neighbors.
- Parameters:
agent - the playing agent- Overrides:
- execute in class ExecuteThenUpdate
update
public void update(Agent agent)
- Update diffusion value. Occurs only when all diffusion has been calculated.
- Overrides:
- update in class ExecuteThenUpdate
isRandomExecution
public boolean isRandomExecution()
- Overrides:
- isRandomExecution in class Rule