|
![]() |
|||||||||
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.CollectStats
public class CollectStats
A rule for gathering values (typically aggegate statistics) from the entire population of agents.
Field Summary |
---|
Fields inherited from class org.ascape.model.AscapeObject |
---|
ARBITRARY_SEED, name, scape |
Constructor Summary | |
---|---|
CollectStats()
Constructs a new stat collecting rule. |
|
CollectStats(StatCollector[] statCollectors)
Constructs a new stat collecting rule. |
Method Summary | |
---|---|
void |
addStatCollector(StatCollector addDataPoint)
Adds value stats to the collection rule. |
void |
addStatCollectors(StatCollector[] addDataPoints)
Adds value stats to the collection rule. |
void |
calculateValues()
Clears the values so that they can be collected for the next iteration. |
void |
clear()
Clears the values so that they can be collected for the next iteration. |
void |
execute(Agent agent)
Collects all values for the agent. |
StatCollector[] |
getStatCollectors()
Returns the stats used to collect values from the scape. |
boolean |
isCauseRemoval()
Could this rule cause the removal of any agents from within an this rule's scape or any agent's scape? Used to determine safe optimization of iterations. |
boolean |
isIterateAll()
Returns true. |
boolean |
isRandomExecution()
Returns false; it doesn't matter what order we collect statistics in. |
void |
removeAllStatCollectors()
Removes any and all existing stat collectors from the rule. |
boolean |
removeStatCollector(StatCollector toBeRemoved)
Removes the stat collector. |
void |
setPhase(int phase)
Sets the phase. |
Methods inherited from class org.ascape.model.rule.Rule |
---|
getScape, 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 CollectStats()
public CollectStats(StatCollector[] statCollectors)
statCollectors
- the stats to useMethod Detail |
---|
public StatCollector[] getStatCollectors()
public void addStatCollectors(StatCollector[] addDataPoints)
addDataPoints
- the stats to addScape.addStatCollectors(org.ascape.util.data.StatCollector[])
,
StatCollector.isAutoCollect()
public void addStatCollector(StatCollector addDataPoint)
addDataPoint
- the add data pointpublic void removeAllStatCollectors()
public boolean removeStatCollector(StatCollector toBeRemoved)
toBeRemoved
- the to be removed
public void clear()
public void calculateValues()
public void execute(Agent agent)
execute
in class Rule
agent
- the target agent.public void setPhase(int phase)
phase
- the new phasepublic boolean isRandomExecution()
isRandomExecution
in class Rule
public boolean isIterateAll()
isIterateAll
in class Rule
public boolean isCauseRemoval()
Rule
isCauseRemoval
in class Rule
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |