RePast
v. 2.0

uchicago.src.sim.space
Interface Discrete2DSpace

All Known Subinterfaces:
IMulti2DGrid
All Known Implementing Classes:
AbsMulti2DGrid, Diffuse2D, Object2DGrid, RasterSpace

public interface Discrete2DSpace

Interface for all Discrete two dimensional spaces.


Field Summary
static int MOORE
           
static int VON_NEUMANN
           
 
Method Summary
 BaseMatrix getMatrix()
          Gets the matrix collection class that contains all the values
 Object getObjectAt(int x, int y)
          Gets the Object at the specified coordinate.
 Dimension getSize()
          Gets the dimension of the space
 int getSizeX()
          Gets the size of the x dimension
 int getSizeY()
          Gets the size of the y dimension
 double getValueAt(int x, int y)
          Gets the value at the specified coordinate if appropriate.
 void putObjectAt(int x, int y, Object object)
          Puts the specified Object at the specified coordinate.
 void putValueAt(int x, int y, double value)
          Puts the specified value at the specified coordinate.
 

Field Detail

VON_NEUMANN

public static final int VON_NEUMANN
See Also:
Constant Field Values

MOORE

public static final int MOORE
See Also:
Constant Field Values
Method Detail

getSizeX

public int getSizeX()
Gets the size of the x dimension


getSizeY

public int getSizeY()
Gets the size of the y dimension


getSize

public Dimension getSize()
Gets the dimension of the space


getObjectAt

public Object getObjectAt(int x,
                          int y)
Gets the Object at the specified coordinate.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the Object at x,y

getValueAt

public double getValueAt(int x,
                         int y)
Gets the value at the specified coordinate if appropriate.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the value at x, y

putObjectAt

public void putObjectAt(int x,
                        int y,
                        Object object)
Puts the specified Object at the specified coordinate.

Parameters:
x - the x coordinate
y - the y coordinate
object - the object to put

putValueAt

public void putValueAt(int x,
                       int y,
                       double value)
Puts the specified value at the specified coordinate.

Parameters:
x - the x coordinate
y - the y coordinate
value - the value to put at x,y

getMatrix

public BaseMatrix getMatrix()
Gets the matrix collection class that contains all the values


RePast
v. 2.0

Bug reports and feature requests to RePast