|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsim.field.grid.AbstractGrid3D
A concrete implementation of the Grid3D methods; used by several subclasses. Note that you should avoid calling these methods from an object of type Grid3D; instead try to call them from something more concrete (AbstractGrid3D or SparseGrid3D). Otherwise they will not get inlined. For example,
Grid3D foo = ... ; foo.tx(4); // will not get inlined AbstractGrid3D bar = ...; bar.tx(4); // WILL get inlined
| Field Summary | |
protected int |
height
|
protected int |
length
|
protected int |
width
|
| Constructor Summary | |
AbstractGrid3D()
|
|
| Method Summary | |
int |
getHeight()
Get the height |
int |
getLength()
Get the length |
void |
getNeighborsHamiltonianDistance(int x,
int y,
int z,
int dist,
boolean toroidal,
IntBag xPos,
IntBag yPos,
IntBag zPos)
Gets all neighbors of a location that satisfy abs(x-X) + abs(y-Y) + abs(z-Z) <= dist. |
void |
getNeighborsMaxDistance(int x,
int y,
int z,
int dist,
boolean toroidal,
IntBag xPos,
IntBag yPos,
IntBag zPos)
Gets all neighbors of a location that satisfy max( abs(x-X) , abs(y-Y), abs(z-Z) ) <= dist. |
int |
getWidth()
Get the width |
int |
stx(int x)
Simple [and fast] toroidal x. |
int |
sty(int y)
Simple [and fast] toroidal y. |
int |
stz(int z)
Simple [and fast] toroidal z. |
int |
tx(int x)
Toroidal x. |
int |
ty(int y)
Toroidal y. |
int |
tz(int z)
Toroidal z. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int width
protected int height
protected int length
| Constructor Detail |
public AbstractGrid3D()
| Method Detail |
public final int getWidth()
Grid3D
getWidth in interface Grid3Dpublic final int getHeight()
Grid3D
getHeight in interface Grid3Dpublic final int getLength()
Grid3D
getLength in interface Grid3Dpublic final int tx(int x)
Grid3D
tx in interface Grid3Dpublic final int ty(int y)
Grid3D
ty in interface Grid3Dpublic final int tz(int z)
Grid3D
tz in interface Grid3Dpublic final int stx(int x)
Grid3D
stx in interface Grid3Dpublic final int sty(int y)
Grid3D
sty in interface Grid3Dpublic final int stz(int z)
Grid3D
stz in interface Grid3D
public void getNeighborsMaxDistance(int x,
int y,
int z,
int dist,
boolean toroidal,
IntBag xPos,
IntBag yPos,
IntBag zPos)
Grid3D
getNeighborsMaxDistance in interface Grid3D
public void getNeighborsHamiltonianDistance(int x,
int y,
int z,
int dist,
boolean toroidal,
IntBag xPos,
IntBag yPos,
IntBag zPos)
Grid3D
getNeighborsHamiltonianDistance in interface Grid3D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||