|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A grid is a structure containing M rows and N columns (gridCells). This structure can be either a proper grid or a torus. A torus wraps between left and right, and between top and bottom. Each Xholon node within the grid can have a Von Neumann (4 neighbors) or Moore (8 neighbors) neighborhood.
Specify these parameters in your ClassDetails configuration file:
Gmg Moore neighborhood, Grid
Gmt Moore neighborhood, Torus
Gvg Von Neumann neighborhood, Grid
Gvt Von Neumann neighborhood, Torus
[Update: January 29, 2007] There is a requirement for Hexagonal neighborhoods.
Ghg Hexagonal neighborhood, Grid
Ght Hexagonal neighborhood, Torus
[Update: February 15, 2007] There is a requirement for 1D Cellular Automaton (CA) neighborhoods.
Gcg CA neigborhood, Grid
Gct CA neigborhood, Torus
[Update: January 29, 2007] There are some similarities in the concept of a grid, and the concept of a regular graph. As defined above, a grid is rectangular. According to Rosen (Discrete Mathematics and Its Applications, 4th ed., 1999, McGraw-Hill, p.455), "a simple graph is called regular if every vertex of this graph has the same degree". For practical purposes, I am including Grid and Regular Graph in the same Java interface. I am adding a number of types of special simple regular graphs: (see Rosen, p. 447+)
Gsk Sibling neighborhood, Complete graph (all nodes connected)
Gss Sibling neighborhood, Complete graph including Self (all nodes connected, including connection to self)
Gsc Sibling neighborhood, Cycle
Gsw Sibling neighborhood, Wheel
A Sibling Neighborhood is the neighborhood that includes all siblings of a specified node.
| Field Summary | |
static int |
BOUNDARY_GRID
|
static int |
BOUNDARY_TORUS
|
static int |
NEIGHBORHOOD_1DCA
|
static int |
NEIGHBORHOOD_HEXAGONAL
|
static int |
NEIGHBORHOOD_MOORE
|
static int |
NEIGHBORHOOD_SIBLING
|
static int |
NEIGHBORHOOD_VON_NEUMANN
|
static int |
P_CAFUTURESELF
|
static int |
P_CALEFTNEIGHBOR
|
static int |
P_CARIGHTNEIGHBOR
|
static int |
P_EAST
|
static int |
P_HEX0
|
static int |
P_HEX1
|
static int |
P_HEX2
|
static int |
P_HEX3
|
static int |
P_HEX4
|
static int |
P_HEX5
|
static int |
P_NORTH
|
static int |
P_NORTHEAST
|
static int |
P_NORTHWEST
|
static int |
P_SOUTH
|
static int |
P_SOUTHEAST
|
static int |
P_SOUTHWEST
|
static int |
P_STAYHERE
|
static int |
P_WEST
|
static int |
REGULAR_COMPLETE
|
static int |
REGULAR_COMPLETE_SELF
|
static int |
REGULAR_CYCLE
|
static int |
REGULAR_WHEEL
|
| Method Summary | |
int |
getNeighType()
Get the neighborhood type, as defined in IGrid. |
int |
getNumNeighbors()
Get the number of neighbors that a grid cell has. |
void |
moveXholonsToGrid(IXholon xhParent,
boolean allowMultiple)
Move a set of xholons randomly into a grid structure. |
void |
setCaFuture()
Set reference to Future Self link, if this is a 1D CA grid. |
void |
setCaLeft()
Set reference to Left Neighbor link, if this is a 1D CA grid. |
void |
setCaRight()
Set reference to Right Neighbor link, if this is a 1D CA grid. |
void |
setEast()
Set reference to east link, if this is a grid. |
void |
setHex0()
Set reference to Hex0 (top) link, if this is a hexagonal grid. |
void |
setHex1()
Set reference to Hex1 link, if this is a hexagonal grid. |
void |
setHex2()
Set reference to Hex2 link, if this is a hexagonal grid. |
void |
setHex3()
Set reference to Hex3 link, if this is a hexagonal grid. |
void |
setHex4()
Set reference to Hex4 link, if this is a hexagonal grid. |
void |
setHex5()
Set reference to Hex5 link, if this is a hexagonal grid. |
void |
setNorth()
Set reference to north link, if this is a grid. |
void |
setNorthEast()
Set reference to north east link, if this is a grid. |
void |
setNorthWest()
Set reference to north west link, if this is a grid. |
void |
setSiblingsComplete()
Set references to all siblings, if this is a complete graph. |
void |
setSiblingsCompleteSelf()
Set references to all siblings and to self, if this is a complete graph including self. |
void |
setSiblingsCycle()
Set references to two adjacent siblings, if this is a cycle. |
void |
setSiblingsWheel()
Set references to two adjacent siblings, and to parent, if this is a wheel. |
void |
setSouth()
Set reference to south link, if this is a grid. |
void |
setSouthEast()
Set reference to south east link, if this is a grid. |
void |
setSouthWest()
Set reference to south west link, if this is a grid. |
void |
setWest()
Set reference to west link, if this is a grid. |
| Field Detail |
public static final int P_STAYHERE
public static final int P_NORTH
public static final int P_NORTHEAST
public static final int P_EAST
public static final int P_SOUTHEAST
public static final int P_SOUTH
public static final int P_SOUTHWEST
public static final int P_WEST
public static final int P_NORTHWEST
public static final int P_HEX0
public static final int P_HEX1
public static final int P_HEX2
public static final int P_HEX3
public static final int P_HEX4
public static final int P_HEX5
public static final int P_CALEFTNEIGHBOR
public static final int P_CARIGHTNEIGHBOR
public static final int P_CAFUTURESELF
public static final int NEIGHBORHOOD_VON_NEUMANN
public static final int NEIGHBORHOOD_MOORE
public static final int NEIGHBORHOOD_HEXAGONAL
public static final int NEIGHBORHOOD_SIBLING
public static final int NEIGHBORHOOD_1DCA
public static final int BOUNDARY_GRID
public static final int BOUNDARY_TORUS
public static final int REGULAR_COMPLETE
public static final int REGULAR_COMPLETE_SELF
public static final int REGULAR_CYCLE
public static final int REGULAR_WHEEL
| Method Detail |
public void setNorth()
public void setNorthEast()
public void setEast()
public void setSouthEast()
public void setSouth()
public void setSouthWest()
public void setWest()
public void setNorthWest()
public void setHex0()
public void setHex1()
public void setHex2()
public void setHex3()
public void setHex4()
public void setHex5()
public void setCaLeft()
public void setCaRight()
public void setCaFuture()
public void setSiblingsComplete()
public void setSiblingsCompleteSelf()
public void setSiblingsCycle()
public void setSiblingsWheel()
public int getNeighType()
public int getNumNeighbors()
public void moveXholonsToGrid(IXholon xhParent,
boolean allowMultiple)
xhParent - The parent of the xholons that should be moved.allowMultiple - Whether multiple xholons are allowed in the same grid cell.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||