Class Within
java.lang.Object
repast.simphony.query.space.projection.SpatialPredicate
repast.simphony.query.space.projection.Within
- All Implemented Interfaces:
ProjectionPredicate
Predicate that evalutes whether one object is within some distance of another in a projection.
- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(ContinuousSpace space) Evaluates against the specified space testing if the the two objects are within some distance of each other in that space.booleanEvaluates the Network against this predicate.booleanEvaluates against the specified space testing if the the two objects are within some distance of each other in that space.booleanevaluate(Projection projection) Evaluates the projection against this predicate.doubledoublegetObj1()getObj2()
-
Constructor Details
-
Within
Creates a Within predicate that will evaluate whether or not the first object is within (<=) a specified path length of the other.- Parameters:
obj1-obj2-
-
-
Method Details
-
evaluate
Description copied from class:SpatialPredicateEvaluates the Network against this predicate.- Specified by:
evaluatein interfaceProjectionPredicate- Overrides:
evaluatein classSpatialPredicate- Parameters:
network- the network to evaluate against.- Returns:
- true if the path length from the first object to the second in the specified Network is less than or equal to the specified value.
-
evaluate
Evaluates against the specified space testing if the the two objects are within some distance of each other in that space.- Specified by:
evaluatein interfaceProjectionPredicate- Overrides:
evaluatein classSpatialPredicate- Parameters:
space- the space to evaluate against- Returns:
- true if the two are objects are within the specified distance of each other.
-
evaluate
Evaluates against the specified space testing if the the two objects are within some distance of each other in that space.- Specified by:
evaluatein interfaceProjectionPredicate- Overrides:
evaluatein classSpatialPredicate- Parameters:
grid- the grid to evaluate against- Returns:
- true if the two are objects are within the specified distance of each other.
-
evaluate
Description copied from class:SpatialPredicateEvaluates the projection against this predicate. This is the default for any Projections not specifically named below.- Specified by:
evaluatein interfaceProjectionPredicate- Overrides:
evaluatein classSpatialPredicate- Parameters:
projection- the projection to evaluate against.- Returns:
- false
-
getObj1
-
getObj2
-
getDistance
public double getDistance() -
getDistanceSq
public double getDistanceSq()
-