|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.brook.ascape.model.AscapeObject
|
+--edu.brook.ascape.model.Agent
|
+--edu.brook.ascape.model.Cell
|
+--edu.brook.ascape.model.CellOccupant
|
+--edu.brook.ascape.model.Scape
|
+--edu.brook.ascape.model.ScapeGraph
A scape with discrete nodes.
| Field Summary | |
protected CoordinateDiscrete |
extent
The extent (furthest valid point) of the graph. |
| Fields inherited from class edu.brook.ascape.model.CellOccupant |
MOVE_RANDOM_LOCATION_RULE,
PLAY_HOST_RULE,
PLAY_NEIGHBORS_RULE,
PLAY_OTHER,
RANDOM_WALK_AVAILABLE_RULE,
RANDOM_WALK_RULE |
| Fields inherited from class edu.brook.ascape.model.Cell |
cellsNear,
coordinate,
neighbors,
thisUpdate |
| Fields inherited from class edu.brook.ascape.model.Agent |
DEATH_RULE,
deleteMarker,
FISSIONING_RULE,
FORCE_DIE_RULE,
FORCE_FISSION_RULE,
FORCE_MOVE_RULE,
INITIALIZE_RULE,
initialized,
ITERATE_AND_UPDATE_RULE,
ITERATE_RULE,
METABOLISM_RULE,
MOVEMENT_RULE,
UPDATE_RULE |
| Fields inherited from class edu.brook.ascape.model.AscapeObject |
ARBITRARY_SEED,
count,
name,
scape |
| Constructor Summary | |
ScapeGraph()
Constructs a graph. |
|
ScapeGraph(Cell prototypeAgent)
|
|
ScapeGraph(Geometry geometry,
Cell prototypeAgent)
|
|
ScapeGraph(java.lang.String name,
Geometry geometry,
Cell prototypeAgent,
CoordinateDiscrete extent)
Constructs a graph of provided extent, to be populated with clones of provided agent. |
|
| Method Summary | |
abstract int |
countWithin(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
Returns the number of cells within the supplied distance that meet the supplied condition. |
void |
executeOnMembers(java.lang.Object[] rules)
Executes the provided rules on every member of the graph, according to the rule settings and the execution order of the scape. |
HostCell[] |
findAvailable()
Returns cells that are available, that is, uncoccupied. |
HostCell[] |
findAvailable(Cell[] candidates)
Returns cells that are available, that is, uncoccupied. |
Cell[] |
findCells(Conditional condition)
Finds cells that meet some condition. |
Cell[] |
findCells(Conditional condition,
Cell[] candidates)
Finds cells that meet some condition. |
static Cell |
findMaximumCell(DataPoint point,
Cell[] candidates)
Finds the cell that has the highest value for some data point. |
Cell |
findMaximumWithin(Cell origin,
DataPoint point,
int distance,
boolean includeOrigin)
|
abstract Cell |
findNearestCell(Cell origin,
Conditional condition)
Finds the nearest cell that meets some condition. |
abstract Cell |
findNearestCell(Cell origin,
Conditional condition,
boolean includeOrigin)
Finds the nearest cell that meets some condition. |
abstract Cell |
findNearestCell(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
Finds the nearest cell that meets some condition. |
CellOccupant[] |
findOccupants()
Returns cells that are available, that is, uncoccupied. |
CellOccupant[] |
findOccupants(Cell[] candidates)
Returns all cell occupants of the provided cells. |
abstract Cell |
findRandomCell()
Returns a cell randomly selected from the lattice. |
Cell |
findRandomCell(Cell excludeCell)
Returns a random unoccupied discrete location in the space given with the lattice. |
Cell[] |
findRandomCells(Cell excludeCell,
int num)
Returns a group of unique cells randomly selected from the lattice. |
Cell[] |
findRandomCells(int num)
Returns a group of unique cells randomly selected from the lattice. |
abstract CoordinateDiscrete |
findRandomCoordinate()
Returns a random location in the space defined by the graph. |
Cell |
findRandomUnoccupiedCell()
Returns a random unoccupied discrete location in the space. |
Cell |
findRandomUnoccupiedCell(Cell excludeCell)
Returns a random unoccupied discrete location in the space. |
abstract Cell |
getCell(CoordinateDiscrete coordinate)
Returns the cell existing at the specified coordinate. |
abstract Cell[] |
getCells()
Returns all cells in the scape as an array. |
abstract Cell[] |
getCellsNear(Cell origin,
int distance,
boolean includeOrigin)
Returns cells that are near the provided cell. |
abstract int |
getDistance(Cell origin,
Cell target)
|
CoordinateDiscrete |
getExtent()
Returns the size of dimensions for this scape. |
int |
getSize()
Returns the size, or number of cells, (the product of all extents) of this graph. |
abstract boolean |
hasWithin(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
Returns true of there is a cell within the supplied distance that meets the supplied condition. |
abstract void |
setCell(CoordinateDiscrete coordinate,
Cell cell)
Returns the cell existing at the specified coordinate. |
void |
setExtent(CoordinateDiscrete extent)
Sets the size of the scape. |
| Methods inherited from class edu.brook.ascape.model.CellOccupant |
die,
getAvailableNeighboringCells,
getCellsNearOnHost,
getHostCell,
getHostScape,
getNeighborsOnHost,
leave,
moveAway,
moveTo,
moveToRandomLocation,
moveToward,
randomWalk,
randomWalkAvailable,
setHostScape |
| Methods inherited from class edu.brook.ascape.model.Cell |
countNeighbors,
countWithin,
findMaximumWithin,
findNearestCell,
findNearestCell,
findNearestCell,
findRandomNeighbor,
getCellsNear,
getCoordinate,
getDistance,
getNeighbors,
getNeighbors,
getNetwork,
getOccupant,
hasWithin,
isAvailable,
isUpdateNeeded,
removeOccupant,
requestUpdate,
requestUpdateNext,
setCoordinate,
setNeighbors,
setNetwork,
setOccupant |
| Methods inherited from class edu.brook.ascape.model.Agent |
death,
deathCondition,
execute,
execute,
fission,
fissionCondition,
fissioning,
getColor,
getColor,
getImage,
getImage,
getModel,
isDelete,
isInitialized,
iterate,
markForDeletion,
metabolism,
move,
movement,
movementCondition,
play,
scapeCreated,
update |
| Methods inherited from class edu.brook.ascape.model.AscapeObject |
getRandom,
getRandomSeed,
getScape,
randomInRange,
randomInRange,
randomIs,
randomToLimit,
reseed,
setName,
setRandom,
setRandomSeed,
setScape |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected CoordinateDiscrete extent
| Constructor Detail |
public ScapeGraph()
public ScapeGraph(java.lang.String name,
Geometry geometry,
Cell prototypeAgent,
CoordinateDiscrete extent)
name - a descriptive name for the scapegeometry - the strucutre of the graphprototypeAgent - the agent whose clones will be used to populate this scapeextent - a coordinate describing the size of this scape
public ScapeGraph(Geometry geometry,
Cell prototypeAgent)
geometry - prototypeAgent - public ScapeGraph(Cell prototypeAgent)
prototypeAgent - | Method Detail |
public CoordinateDiscrete getExtent()
public void setExtent(CoordinateDiscrete extent)
extent - a coordinate at the maximum extentpublic int getSize()
public void executeOnMembers(java.lang.Object[] rules)
public CellOccupant[] findOccupants()
public CellOccupant[] findOccupants(Cell[] candidates)
candidates - the cells to return occupants ofpublic HostCell[] findAvailable()
public HostCell[] findAvailable(Cell[] candidates)
candidates - the cells to return available cells frompublic abstract Cell[] getCells()
public abstract Cell getCell(CoordinateDiscrete coordinate)
public abstract void setCell(CoordinateDiscrete coordinate,
Cell cell)
public abstract Cell findRandomCell()
public Cell findRandomCell(Cell excludeCell)
excludeCell - a cell to exclude from get (typically origin)
public Cell[] findRandomCells(Cell excludeCell,
int num)
public Cell[] findRandomCells(int num)
public Cell findRandomUnoccupiedCell()
public Cell findRandomUnoccupiedCell(Cell excludeCell)
public Cell[] findCells(Conditional condition)
condition - the condition that found cell must meet
public Cell[] findCells(Conditional condition,
Cell[] candidates)
condition - the condition that found cell must meet
public static Cell findMaximumCell(DataPoint point,
Cell[] candidates)
point - the data point for the maximum value to look forcandidates - the cells to look for maximum values within
public Cell findMaximumWithin(Cell origin,
DataPoint point,
int distance,
boolean includeOrigin)
public abstract Cell[] getCellsNear(Cell origin,
int distance,
boolean includeOrigin)
origin - the agent to find cells neardistance - the distance to form centralCells to return cellsincludeOrigin - should supplied agent be included in the return set
public abstract Cell findNearestCell(Cell origin,
Conditional condition)
origin - the agent to find cells nearcondition - the condition that found cell must meet
public abstract Cell findNearestCell(Cell origin,
Conditional condition,
boolean includeOrigin)
origin - the agent to find cells nearcondition - the condition that found cell must meetincludeOrigin - should supplied agent be included in the search
public abstract Cell findNearestCell(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
origin - the agent to find cells nearcondition - the condition that found cell must meetincludeOrigin - should supplied agent be included in the searchmaximumDistance - the maximum distance to search within
public abstract boolean hasWithin(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
origin - the agent to find cells nearcondition - the condition that found cell must meetincludeOrigin - should supplied agent be included in the searchmaximumDistance - the distance to search within
public abstract int countWithin(Cell origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
origin - the agent to find cells nearcondition - the condition that found cell must meetincludeOrigin - should supplied agent be included in the searchmaximumDistance - the distance to search within
public abstract int getDistance(Cell origin,
Cell target)
public abstract CoordinateDiscrete findRandomCoordinate()
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||