|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.primordion.xholon.base.Xholon
org.primordion.xholon.base.XholonWithPorts
org.primordion.xholon.base.AbstractGrid
org.primordion.xholon.base.PatchOwner
PatchOwner owns a collection of Logo Patches. It's the parent of the first row in the grid. It knows how to create turtles within the patches it owns, and can also clear its patches and turtles back to their default values.
TODO add May 15, 2007): diffuse diffuse4 patch
| Field Summary |
| Fields inherited from class org.primordion.xholon.base.AbstractGrid |
P_BEHAVIOR, P_NEXT, P_PREVIOUS |
| Fields inherited from class org.primordion.xholon.base.XholonWithPorts |
port |
| Fields inherited from class org.primordion.xholon.base.Xholon |
DEFAULT_LEVEL, interaction, interactionsEnabled |
| Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
| Fields inherited from interface org.primordion.xholon.base.IGrid |
BOUNDARY_GRID, BOUNDARY_TORUS, NEIGHBORHOOD_1DCA, NEIGHBORHOOD_HEXAGONAL, NEIGHBORHOOD_MOORE, NEIGHBORHOOD_SIBLING, NEIGHBORHOOD_VON_NEUMANN, P_CAFUTURESELF, P_CALEFTNEIGHBOR, P_CARIGHTNEIGHBOR, P_EAST, P_HEX0, P_HEX1, P_HEX2, P_HEX3, P_HEX4, P_HEX5, P_NORTH, P_NORTHEAST, P_NORTHWEST, P_SOUTH, P_SOUTHEAST, P_SOUTHWEST, P_STAYHERE, P_WEST, REGULAR_COMPLETE, REGULAR_COMPLETE_SELF, REGULAR_CYCLE, REGULAR_WHEEL |
| Constructor Summary | |
PatchOwner()
|
|
| Method Summary | |
void |
ca()
Clear patches, turtles, etc. |
void |
cd()
Clear the drawing surface. |
void |
clearAll()
Clear patches, turtles, etc. |
void |
clearDrawing()
Clear the drawing surface. |
void |
clearPatches()
Set all patch variables to their initial values. |
void |
clearTurtles()
Kill all turtles within the scope of this PatchOwner. |
void |
cp()
Set all patch variables to their initial values. |
void |
createTurtles(int numTurtles)
Create a given number of new turtles in the center of the grid. |
void |
createTurtles(int numTurtles,
java.lang.String breed)
Create a given number of new turtles in the center of the grid, of a given breed. |
void |
crt(int numTurtles)
Create a given number of new turtles in the center of the grid. |
void |
crt(int numTurtles,
java.lang.String breed)
Create a given number of new turtles in the center of the grid, of a given breed. |
void |
ct()
Kill all turtles within the scope of this PatchOwner. |
void |
diffuse(java.lang.String patchVariable,
double number)
Asks each patch to share the current value of a specified variable with all of its neighbors. |
void |
diffuse4(java.lang.String patchVariable,
double number)
Asks each patch to share the current value of a specified variable with all of its neighbors. |
IAttribute |
getAggregator(IXholon turtleOrPatch)
Return the aggregator for the specified turtle or patch. |
int |
getMaxPxcor()
Return the maximum Patch x coordinate. |
int |
getMaxPycor()
Return the maximum Patch y coordinate. |
int |
getMinPxcor()
Return the minimum Patch x coordinate. |
int |
getMinPycor()
Return the minimum Patch y coordinate. |
int |
getWorldHeight()
Return the height of the world (the grid height). |
int |
getWorldWidth()
Return the width of the world (the grid width). |
IPatch |
patch(int pxcor,
int pycor)
Return the patch with the specified absolute coordinates. |
| Methods inherited from class org.primordion.xholon.base.AbstractGrid |
configure, getNeighType, getNumNeighbors, initialize, moveXholonsToGrid, postConfigure, postReconfigure, preReconfigure, reconfigure, setCaFuture, setCaLeft, setCaRight, setEast, setHex0, setHex1, setHex2, setHex3, setHex4, setHex5, setNorth, setNorthEast, setNorthWest, setSiblingsComplete, setSiblingsCompleteSelf, setSiblingsCycle, setSiblingsWheel, setSouth, setSouthEast, setSouthWest, setWest |
| Methods inherited from class org.primordion.xholon.base.XholonWithPorts |
configure, getMaxPorts, getPort, isActiveObject, isBound, isContainer, isPassiveObject, setMaxPorts, setPorts, terminate |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PatchOwner()
| Method Detail |
public void clearAll()
public void ca()
public void clearDrawing()
public void cd()
public void clearPatches()
public void cp()
public void clearTurtles()
public void ct()
public void createTurtles(int numTurtles)
numTurtles - The number of new turtles to create.public void crt(int numTurtles)
numTurtles - The number of new turtles to create.
public void createTurtles(int numTurtles,
java.lang.String breed)
numTurtles - The number of new turtles to create.breed - The breed of turtle to create.
public void crt(int numTurtles,
java.lang.String breed)
numTurtles - The number of new turtles to create.breed - The breed of turtle to create.
public void diffuse(java.lang.String patchVariable,
double number)
patchVariable - number -
public void diffuse4(java.lang.String patchVariable,
double number)
patchVariable - number -
public IPatch patch(int pxcor,
int pycor)
pxcor - An x coordinate.pycor - A y coordinate.
public int getMaxPxcor()
public int getMaxPycor()
public int getMinPxcor()
public int getMinPycor()
public int getWorldWidth()
public int getWorldHeight()
public IAttribute getAggregator(IXholon turtleOrPatch)
turtleOrPatch - A turtle or patch instance.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||