net.sourceforge.cilib.games.measurement
Class RecordItemLocationMeasure

java.lang.Object
  extended by net.sourceforge.cilib.games.measurement.AgentMeasure
      extended by net.sourceforge.cilib.games.measurement.SingleAgentMeasure
          extended by net.sourceforge.cilib.games.measurement.RecordItemLocationMeasure
All Implemented Interfaces:
Serializable, Cloneable

public class RecordItemLocationMeasure
extends SingleAgentMeasure

Record each location an Agent has occupied at each timestep in the game. This could also be used to measure locations a specific item type has occupied.

Author:
leo
See Also:
Serialized Form

Constructor Summary
RecordItemLocationMeasure()
           
RecordItemLocationMeasure(Enum itemToken)
           
RecordItemLocationMeasure(RecordItemLocationMeasure other)
           
 
Method Summary
 void clearData()
          Clear all measured data.
 RecordItemLocationMeasure getClone()
          Create a cloned copy of the current object and return it.
 Type getMeasuredData()
          return the measured data
 void measure(Game<GameState> game)
          Measure game specific information and store it
 
Methods inherited from class net.sourceforge.cilib.games.measurement.SingleAgentMeasure
getItemToken, setItemToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordItemLocationMeasure

public RecordItemLocationMeasure()

RecordItemLocationMeasure

public RecordItemLocationMeasure(Enum itemToken)

RecordItemLocationMeasure

public RecordItemLocationMeasure(RecordItemLocationMeasure other)
Method Detail

clearData

public void clearData()
Clear all measured data.

Specified by:
clearData in class AgentMeasure

getClone

public RecordItemLocationMeasure getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class SingleAgentMeasure
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getMeasuredData

public Type getMeasuredData()
return the measured data

Specified by:
getMeasuredData in class AgentMeasure
Returns:

measure

public void measure(Game<GameState> game)
Measure game specific information and store it

Specified by:
measure in class AgentMeasure
Parameters:
game - the game to measure information from


Copyright © 2009 CIRG. All Rights Reserved.