RePast
v. 2.0

uchicago.src.sim.space
Class HexMultiNeighborhooder

java.lang.Object
  |
  +--uchicago.src.sim.space.AbstractNeighborhooder
        |
        +--uchicago.src.sim.space.HexMultiNeighborhooder
All Implemented Interfaces:
Neighborhooder

public class HexMultiNeighborhooder
extends AbstractNeighborhooder


Nested Class Summary
 class HexMultiNeighborhooder.LocAdder
           
 class HexMultiNeighborhooder.ObjectAdder
           
 
Field Summary
 
Fields inherited from class uchicago.src.sim.space.AbstractNeighborhooder
comparator, space, torus
 
Constructor Summary
HexMultiNeighborhooder(IMulti2DGrid space)
           
 
Method Summary
protected  void addXY(ArrayList v, int x, int y)
           
 Vector getNeighbors(int x, int y, int[] extents, boolean returnNull)
           
 ArrayList getNeighborsList(int x, int y, int[] extents, boolean returnNull)
           
 ArrayList getNeighborsLoc(int x, int y, int[] extents, boolean returnNull)
           
protected  ArrayList getNeighs(int x, int y, int[] extents, boolean returnNull)
           
 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.AbstractNeighborhooder
compareMax, compareMin, findMaximum, findMinimum, setComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexMultiNeighborhooder

public HexMultiNeighborhooder(IMulti2DGrid space)
Method Detail

xnorm

public int xnorm(int x)
Normalize the x value to the toroidal coordinates

Parameters:
x - the value to normalize
Returns:
the normalized value

ynorm

public int ynorm(int y)
Normalize the y value to the toroidal coordinates

Parameters:
y - the value to normalize
Returns:
the normalized value

getNeighbors

public Vector getNeighbors(int x,
                           int y,
                           int[] extents,
                           boolean returnNull)

getNeighborsList

public ArrayList getNeighborsList(int x,
                                  int y,
                                  int[] extents,
                                  boolean returnNull)

getNeighborsLoc

public ArrayList getNeighborsLoc(int x,
                                 int y,
                                 int[] extents,
                                 boolean returnNull)

getNeighs

protected ArrayList getNeighs(int x,
                              int y,
                              int[] extents,
                              boolean returnNull)

addXY

protected void addXY(ArrayList v,
                     int x,
                     int y)

RePast
v. 2.0

Bug reports and feature requests to RePast