|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uchicago.src.sim.space.Object2DGrid
|
+--uchicago.src.sim.space.Object2DTorus
A discrete 2 dimensional torus of objects, accessed by x and y coordinates.
| Field Summary |
| Fields inherited from class uchicago.src.sim.space.Object2DGrid |
matrix, Mneigh, PGM_ASCII, RASTER_ASCII, VNneigh, xSize, ySize |
| Fields inherited from interface uchicago.src.sim.space.Discrete2DSpace |
MOORE, VON_NEUMANN |
| Constructor Summary | |
Object2DTorus(InputStream stream,
int type)
Creates a new torus from the specified InputStream. |
|
Object2DTorus(int xSize,
int ySize)
Creates a new torus of the specified size. |
|
Object2DTorus(String fileName,
int type)
Creates a new torus from the specified file. |
|
| Method Summary | |
Object |
getObjectAt(int x,
int y)
Gets the object at the specified coordinate |
double |
getValueAt(int x,
int y)
Gets the value at (x,y) |
void |
putObjectAt(int x,
int y,
Object object)
Puts the specified object at (x,y), wrapping the coordinates around the torus if necessary. |
void |
putValueAt(int x,
int y,
double value)
Puts the specified double at (x,y), wrapping the coordinates around the torus if necessary. |
int |
xnorm(int x)
Normalize the x value to the toroidal coordinates |
int |
ynorm(int y)
Normalize the y value to the toroidal coordinates |
| Methods inherited from class uchicago.src.sim.space.Object2DGrid |
findMaximum, findMinimum, getMatrix, getMooreNeighbors, getMooreNeighbors, getSize, getSizeX, getSizeY, getVonNeumannNeighbors, getVonNeumannNeighbors, rangeCheck, setComparator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Object2DTorus(int xSize,
int ySize)
xSize - the size of the x dimensionySize - the size of the y dimension
public Object2DTorus(String fileName,
int type)
fileName - the name of the file to create the torus fromtype - the type of the fileObject2DGrid
public Object2DTorus(InputStream stream,
int type)
stream - the InputStream to create the torus from.type - the type of the fileObject2DGrid| Method Detail |
public void putObjectAt(int x,
int y,
Object object)
putObjectAt in interface Discrete2DSpaceputObjectAt in class Object2DGridx - the x coordinatey - the y coordinateobject - the object to put at (x,y)
public void putValueAt(int x,
int y,
double value)
putValueAt in interface Discrete2DSpaceputValueAt in class Object2DGridx - the x coordinatey - the y coordinatevalue - the value to put at (x,y)
public Object getObjectAt(int x,
int y)
getObjectAt in interface Discrete2DSpacegetObjectAt in class Object2DGridx - the x coordinatey - the y coordinate
public double getValueAt(int x,
int y)
getValueAt in interface Discrete2DSpacegetValueAt in class Object2DGridpublic int xnorm(int x)
x - the value to normalize
public int ynorm(int y)
y - the value to normalize
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||