Class Within
- java.lang.Object
-
- repast.simphony.query.space.projection.SpatialPredicate
-
- repast.simphony.query.space.projection.Within
-
- All Implemented Interfaces:
ProjectionPredicate
public class Within extends SpatialPredicate
Predicate that evalutes whether one object is within some distance of another in a projection.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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
evaluate(Network network)
Evaluates the Network against this predicate.boolean
evaluate(Grid grid)
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
getDistance()
double
getDistanceSq()
Object
getObj1()
Object
getObj2()
-
-
-
Method Detail
-
evaluate
public boolean evaluate(Network network)
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
public boolean evaluate(ContinuousSpace space)
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
public boolean evaluate(Grid grid)
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
public boolean evaluate(Projection projection)
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
public Object getObj1()
-
getObj2
public Object getObj2()
-
getDistance
public double getDistance()
-
getDistanceSq
public double getDistanceSq()
-
-