|
![]() |
|||||||||
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
public abstract class Array
The Class Array.
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 | |
---|---|
static boolean |
CACHE_RESULTS
The Constant 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 | |
---|---|
Array()
Constructs an array space. |
|
Array(CoordinateDiscrete extent)
Constructs an array space of provided extent. |
Method Summary | |
---|---|
Location |
findNearest(Coordinate origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
Finds the nearest cell that meets some condition. |
abstract int |
findNearestMatchRank(Coordinate origin,
Conditional condition,
boolean includeOrigin,
double maximumDistance)
Returns the nearest rank that includes a cell which matches the supplied condition, -1 if no matches. |
abstract Location |
findRandomMatchInRank(Coordinate origin,
Conditional condition,
int rank)
Returns a random element in the supplied rank that matches the supplied condition, null if no matches. |
java.util.List |
findWithin(Coordinate origin,
Conditional condition,
boolean includeOrigin,
double distance)
Returns cells that are near the provided coordinate. |
protected abstract java.util.List |
findWithinImpl(Coordinate origin,
boolean includeOrigin,
double distance)
Returns cells that are near the provided coordinate. |
void |
replace(Node currentCell,
Node newCell)
Changes the agent at the foirmer cells location to the supplied cell. |
void |
swap(Node one,
Node two)
Swaps two cells in the graph. |
Methods inherited from class org.ascape.model.space.CollectionSpace |
---|
add, add, addAll, calculateDistance, clear, clone, conditionalIterator, conditionalIterator, construct, contains, containsAll, countWithin, createOrder, createSpatialConditional, deleteSweep, filter, find, findMaximum, findMaximum, findMaximumWithin, findMinimum, findMinimum, findMinimumWithin, findNearest, findRandom, findRandom, findRandom, findRandom, findRandomCoordinate, findRandomWithin, get, getContext, getExtent, getGeometry, getRandom, hasWithin, initialize, isDeleteSweepNeeded, isEmpty, isMutable, isPeriodic, iterator, iteratorCount, iteratorToList, moveAway, moveToward, newLocation, newLocation, populate, randomInRange, randomInRange, randomIs, randomizeOrder, randomToLimit, remove, removeAll, retainAll, safeIterator, safeIterator, safeIterators, safeRandomIterator, set, setContext, setExtent, setExtent, setGeometry, setPeriodic, setRandom, setSize, size, toArray, toArray, toList, 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 |
Field Detail |
---|
public static final boolean CACHE_RESULTS
Constructor Detail |
---|
public Array()
public Array(CoordinateDiscrete extent)
extent
- a coordinate describing the size of this spaceMethod Detail |
---|
public abstract Location findRandomMatchInRank(Coordinate origin, Conditional condition, int rank)
origin
- the agent to find cells nearcondition
- the condition that found cell must meetrank
- the rank to return match in
public abstract int findNearestMatchRank(Coordinate origin, Conditional condition, boolean includeOrigin, double maximumDistance)
origin
- the agent to find cells nearcondition
- the condition that found cell must meetincludeOrigin
- should supplied agent (rank 0) be included in the searchmaximumDistance
- the maximum distance to search within
public Location findNearest(Coordinate origin, Conditional condition, boolean includeOrigin, double maximumDistance)
findNearest
in interface Space
findNearest
in class CollectionSpace
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 java.util.List findWithin(Coordinate origin, Conditional condition, boolean includeOrigin, double distance)
findWithin
in interface Space
findWithin
in class CollectionSpace
origin
- the agent to find cells neardistance
- the distance to form centralCells to return cellsincludeOrigin
- should supplied agent be included in the return setcondition
- the condition
protected abstract java.util.List findWithinImpl(Coordinate origin, boolean includeOrigin, double distance)
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 void replace(Node currentCell, Node newCell)
currentCell
- the current cellnewCell
- the new cellpublic void swap(Node one, Node two)
one
- the onetwo
- the two
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |