|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ascape.model.space.CollectionSpace
org.ascape.model.space.Discrete
org.ascape.model.space.Array
org.ascape.model.space.Array2DBase
org.ascape.model.space.Array2D
org.ascape.model.space.Array2DMoore
public class Array2DMoore
A two-dimensional space providing effecient implementations for Moore neighbors. In a Moore neighborhood, cells are considered neighbors if they meet the target at any point:
OOO OXO OOO
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.ascape.model.space.CollectionSpace |
---|
CollectionSpace.ClosestDataPoint, CollectionSpace.ConditionalIterator, CollectionSpace.CSIterator, CollectionSpace.CSMutableIterator, CollectionSpace.ListMutableRandomIterator, CollectionSpace.ListRandomIterator, CollectionSpace.MutableSubIterator, CollectionSpace.SubIterator |
Field Summary |
---|
Fields inherited from class org.ascape.model.space.Array2D |
---|
MAX_RANK |
Fields inherited from class org.ascape.model.space.Array2DBase |
---|
cells, currentPositionInRank, currentRank, nearnessLineOfSight, order, rankLimit, relativeCoordinates, relativeCoordinatesRankDistance, relativeCoordinatesRankLengths, relativeCoordinatesTemplate, sumOfCoordinatesWithinRank |
Fields inherited from class org.ascape.model.space.Array |
---|
CACHE_RESULTS |
Fields inherited from class org.ascape.model.space.Discrete |
---|
performanceWarning |
Fields inherited from class org.ascape.model.space.CollectionSpace |
---|
collection, ESTIMATED_MAXIMUM_SIZE, extent, geometry |
Constructor Summary | |
---|---|
Array2DMoore()
Constructs a two-dimensional moore-neighborhood array of provided geometry and extent, populated with clones of provided agent. |
|
Array2DMoore(CoordinateDiscrete extent)
Constructs a two-dimensional moore-neighborhood space array of provided geometry and extent, populated with clones of provided agent. |
Method Summary | |
---|---|
double |
calculateDistance(Coordinate origin,
Coordinate target)
Returns the shortest distance between one cell and the other, assuming a walk between the two cells. |
java.util.List |
findWithinImpl(Coordinate origin,
boolean includeSelf,
double distance)
Returns cells that are near the provided coordinate. |
Methods inherited from class org.ascape.model.space.Array2D |
---|
calculateDistanceMoore, countWithin, findFirstMatchInRank, findNearest, findNearestMatchRank, findRandomMatchInRank, getNumOfCoordinatesWithinRank, getXSpan, getYSpan, hasWithin, initialize |
Methods inherited from class org.ascape.model.space.Array |
---|
findWithin, replace, swap |
Methods inherited from class org.ascape.model.space.CollectionSpace |
---|
add, calculateDistance, conditionalIterator, conditionalIterator, createOrder, createSpatialConditional, deleteSweep, filter, find, findMaximum, findMaximum, findMaximumWithin, findMinimum, findMinimum, findMinimumWithin, findNearest, findRandom, findRandom, findRandom, findRandomWithin, getContext, getExtent, getGeometry, getRandom, isDeleteSweepNeeded, isPeriodic, iteratorCount, iteratorToList, moveAway, moveToward, newLocation, newLocation, randomInRange, randomInRange, randomIs, randomizeOrder, randomToLimit, safeIterators, setContext, setExtent, setPeriodic, setRandom, setSize, withinIterator |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public Array2DMoore()
public Array2DMoore(CoordinateDiscrete extent)
extent
- a coordinate describing the size of this spaceMethod Detail |
---|
public final double calculateDistance(Coordinate origin, Coordinate target)
calculateDistance
in interface Space
calculateDistance
in class Discrete
origin
- the starting celltarget
- the ending cell
public java.util.List findWithinImpl(Coordinate origin, boolean includeSelf, double distance)
Array
findWithinImpl
in class Array
origin
- the agent to find cells nearincludeSelf
- should supplied agent be included in the return setdistance
- the distance to form centralCells to return cells
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |