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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate
(ContinuousSpace space) Evaluates against the specified space testing if the the two objects are within some distance of each other in that space.boolean
Evaluates the Network against this predicate.boolean
Evaluates against the specified space testing if the the two objects are within some distance of each other in that space.boolean
evaluate
(Projection projection) Evaluates the projection against this predicate.double
double
getObj1()
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:SpatialPredicate
Evaluates the Network against this predicate.- Specified by:
evaluate
in interfaceProjectionPredicate
- Overrides:
evaluate
in 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:
evaluate
in interfaceProjectionPredicate
- Overrides:
evaluate
in 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:
evaluate
in interfaceProjectionPredicate
- Overrides:
evaluate
in 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:SpatialPredicate
Evaluates the projection against this predicate. This is the default for any Projections not specifically named below.- Specified by:
evaluate
in interfaceProjectionPredicate
- Overrides:
evaluate
in classSpatialPredicate
- Parameters:
projection
- the projection to evaluate against.- Returns:
- false
-
getObj1
-
getObj2
-
getDistance
public double getDistance() -
getDistanceSq
public double getDistanceSq()
-