|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectuchicago.src.sim.topology.space.d3.AbstractObject3DTopology
uchicago.src.sim.topology.space.d3.AbstractObject3DSpace
Base class for grids whose cells can hold one or more occupants. The actual object held in the grid cell is a Object2DLocation object.
| Nested Class Summary | |
class |
AbstractObject3DSpace.Abstract3DLocation
A data structure holding an object and the x and y coordinates of that object. |
| Field Summary | |
protected Object3DLocation[][][] |
matrix
|
| Fields inherited from class uchicago.src.sim.topology.space.d3.AbstractObject3DTopology |
locations |
| Constructor Summary | |
AbstractObject3DSpace(java.lang.String type,
int xSize,
int ySize,
int zSize)
|
|
| Method Summary | |
abstract Location |
getLocation(int x,
int y,
int z)
Gets the Object2DLocation object at the specified coordinates. |
Location |
getLocation(java.lang.Object obj)
Attempts to get the Location for a specific object. |
double[] |
getSize()
Gets the dimension of the space |
int |
getSizeX()
|
int |
getSizeY()
|
int |
getSizeZ()
|
void |
removeLocation(int x,
int y,
int z)
Clears the contents the specified cell. |
void |
removeLocation(Location location)
Clears the contents the specified location. |
void |
trim()
Releases any superfluous memory. |
int |
xnorm(int x)
|
int |
ynorm(int y)
|
int |
znorm(int z)
|
| Methods inherited from class uchicago.src.sim.topology.space.d3.AbstractObject3DTopology |
addRelation, distance, getRelations, getRelations, getRelationType, removeRelation, setRelationType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Object3DLocation[][][] matrix
| Constructor Detail |
public AbstractObject3DSpace(java.lang.String type,
int xSize,
int ySize,
int zSize)
| Method Detail |
public void removeLocation(Location location)
removeLocation in interface Spacelocation - the location to remove from the space
public void removeLocation(int x,
int y,
int z)
removeLocation in interface Object3DSpacex - the x coordinate of the cell to cleary - the y coordinate of the cell to clear
public abstract Location getLocation(int x,
int y,
int z)
getLocation in interface Object3DSpacex - the x coordinatey - the y coordinate
java.lang.IndexOutOfBoundsException - if the given coordinates are out of
range (x < 0 || x >= xSize || y < 0 || y >= ySize)public Location getLocation(java.lang.Object obj)
Space
getLocation in interface Spacepublic double[] getSize()
Space
getSize in interface Spacepublic int getSizeX()
getSizeX in interface Object3DSpacepublic int getSizeY()
getSizeY in interface Object3DSpacepublic int getSizeZ()
getSizeZ in interface Object3DSpacepublic void trim()
trim in interface Object3DSpacepublic int xnorm(int x)
xnorm in interface Object3DSpacepublic int ynorm(int y)
ynorm in interface Object3DSpacepublic int znorm(int z)
znorm in interface Object3DSpace
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||