uchicago.src.sim.space
Class HexNeighborhooder
java.lang.Object
|
+--uchicago.src.sim.space.AbstractNeighborhooder
|
+--uchicago.src.sim.space.HexNeighborhooder
- All Implemented Interfaces:
- Neighborhooder
- public class HexNeighborhooder
- extends AbstractNeighborhooder
|
Method Summary |
protected void |
addXY(Vector v,
int x,
int y)
|
Vector |
getNeighbors(int x,
int y,
boolean returnNull)
Returns the ring of neighbors with a radius of 1 surrounding the
cell at x, y. |
Vector |
getNeighbors(int x,
int y,
int[] extents,
boolean returnNull)
Returns the rings of neighbors surrounding the cell at x, y. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HexNeighborhooder
public HexNeighborhooder(Discrete2DSpace space)
getNeighbors
public Vector getNeighbors(int x,
int y,
boolean returnNull)
- Returns the ring of neighbors with a radius of 1 surrounding the
cell at x, y.
- Parameters:
x - the x coordinate of the celly - the y coordinate of the cell
- Returns:
- an array of doubles in clockwise order starting with the
north or "12" neighboring cell
getNeighbors
public Vector getNeighbors(int x,
int y,
int[] extents,
boolean returnNull)
- Returns the rings of neighbors surrounding the cell at x, y. The number
of rings is specified by the radius parameter.
- Parameters:
x - the x coordinate of the celly - the y coordinate of the cell
- Returns:
- an array of doubles beginning with the outermost ring of
neighbors, starting with the north or "12 o'clock" neighboring cell,
continuing clockwise and spiraling inwards
addXY
protected void addXY(Vector v,
int x,
int y)
Bug reports and feature requests to RePast