|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.model.AscapeObject
org.ascape.model.rule.Rule
org.ascape.model.rule.ExecuteThenUpdate
org.ascape.model.rule.Diffusion
public abstract class Diffusion
A rule causing some agent value to diffuse to its neighbors.
| Field Summary |
|---|
| Fields inherited from class org.ascape.model.AscapeObject |
|---|
ARBITRARY_SEED, name, PLATFORM_DEFAULT_COLOR, scape |
| Constructor Summary | |
|---|---|
Diffusion(java.lang.String name)
Constructs a diffusion rule with the provided name. |
|
| Method Summary | |
|---|---|
void |
execute(Agent agent)
Calculate and store diffusion value to neighbors. |
abstract double |
getDiffusionValue(Agent agent)
Override with a call to the getter of the value to diffuse. |
boolean |
isRandomExecution()
Does this action affect the state of any other agent in such a way that that another agent's execution of this rule would be affected? Used to determine safe optimization of iterations. |
abstract void |
setDiffusionValue(Agent agent,
double value)
Override with a call to the setter of the diffused value. |
void |
update(Agent agent)
Update diffusion value. |
| Methods inherited from class org.ascape.model.rule.Rule |
|---|
getScape, isCauseRemoval, isIterateAll, setScape |
| Methods inherited from class org.ascape.model.AscapeObject |
|---|
clone, diffDeep, diffDeep, diffDeepBFS, diffDeepDFS, diffDeepValidate, diffDeepVisit, equalsDeep, equalsDeep, equalsDeep, getComparisonStream, getName, getRandom, getRandomSeed, randomInRange, randomInRange, randomIs, randomToLimit, reseed, setComparisonStream, setName, setRandom, setRandomSeed, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Diffusion(java.lang.String name)
name - the name of this object| Method Detail |
|---|
public abstract double getDiffusionValue(Agent agent)
agent - the agent
public abstract void setDiffusionValue(Agent agent,
double value)
agent - the agentvalue - the valuepublic void execute(Agent agent)
execute in class ExecuteThenUpdateagent - the playing agentpublic void update(Agent agent)
update in class ExecuteThenUpdateagent - the agentpublic boolean isRandomExecution()
Rule
isRandomExecution in class Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||