org.jscience.computing.ai.agents
Class DiscreteEnvironment

java.lang.Object
  extended by org.jscience.computing.ai.agents.Environment
      extended by org.jscience.computing.ai.agents.DiscreteEnvironment
Direct Known Subclasses:
CubicBoundedEnvironment, CubicTorusEnvironment, FlatBoundedEnvironment, FlatTorusEnvironment

public abstract class DiscreteEnvironment
extends Environment

A class representing a simulated space in which objects position are constrained to a finite number of values, usually on a "grid".


Field Summary
static int MOORE_NEIGHBORHOOD
          DOCUMENT ME!
static int VON_NEUMANN_NEIGHBORHOOD
          DOCUMENT ME!
 
Constructor Summary
DiscreteEnvironment()
           
 
Method Summary
abstract  java.util.Set getContentsAt(int[] position)
          DOCUMENT ME!
abstract  int getDimension()
          DOCUMENT ME!
abstract  java.util.Set getNeighbors(int[] position, int method)
          Returns the available Cell neighbors.
abstract  void setContentsAt(int[] position, java.util.Set contents)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.computing.ai.agents.Environment
getContents, isCurvedOnItself
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOORE_NEIGHBORHOOD

public static final int MOORE_NEIGHBORHOOD
DOCUMENT ME!

See Also:
Constant Field Values

VON_NEUMANN_NEIGHBORHOOD

public static final int VON_NEUMANN_NEIGHBORHOOD
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

DiscreteEnvironment

public DiscreteEnvironment()
Method Detail

getContentsAt

public abstract java.util.Set getContentsAt(int[] position)
DOCUMENT ME!

Parameters:
position - DOCUMENT ME!
Returns:
DOCUMENT ME!

setContentsAt

public abstract void setContentsAt(int[] position,
                                   java.util.Set contents)
DOCUMENT ME!

Parameters:
position - DOCUMENT ME!
contents - DOCUMENT ME!

getNeighbors

public abstract java.util.Set getNeighbors(int[] position,
                                           int method)
Returns the available Cell neighbors.

Parameters:
position - DOCUMENT ME!
method - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDimension

public abstract int getDimension()
DOCUMENT ME!

Returns:
DOCUMENT ME!