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

Fields inherited from class edu.brook.ascape.model.AscapeObject
ARBITRARY_SEED, count, name, scape
 
Constructor Summary
Diffusion()
           
 
Method Summary
 void execute(Agent agent)
          Calculate and store diffusion value to neighbors.
abstract  float getDiffusionValue(Agent agent)
          Override with a call to the getter of the value to diffuse.
 boolean isRandomExecution()
           
abstract  void setDiffusionValue(Agent agent, float value)
          Override with a call to the setter of the diffused value.
 void update(Agent agent)
          Update diffusion value.
 
Methods inherited from class edu.brook.ascape.rule.Rule
getScape, isCauseRemoval, isIterateAll, setScape
 
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
 

Constructor Detail

Diffusion

public Diffusion()
Method Detail

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

(c) 1998-2000 The Brookings Insitution
Webpage