Class ContinuousWithin<T>
- java.lang.Object
-
- repast.simphony.query.WithinDistance<T>
-
- repast.simphony.query.space.continuous.ContinuousWithin<T>
-
- All Implemented Interfaces:
Query<T>
public class ContinuousWithin<T> extends WithinDistance<T>
A within type query over a continous space. This query will return all the objects that are within a specified distance of a specified object in either all the continuous spaces in a context or in a specific continuous space. "Within" includes the distance, so within 10 means all the objects from a distance of 0 to 10 including 10.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Field Summary
-
Fields inherited from class repast.simphony.query.WithinDistance
distance, distanceSq, EMPTY, obj
-
-
Constructor Summary
Constructors Constructor Description ContinuousWithin(Context<T> context, T obj, double distance)
Creates a ContinuousWithin query that will find all the objects within the specified distance of the specified object in all the continuous spaces in the specified context.ContinuousWithin(ContinuousSpace<T> space, T obj, double distance)
Creates a ContinuousWithin query that will find all the objects within the specified distance of the specified object in the specified space.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterable<T>
createIterable()
Creates an iterable over all the objects within the specified distance in the space.protected Iterable<T>
createIterable(Context<T> context)
Creates an iterable over all the objects within the specified distance in all the continuoous spaces in the context.-
Methods inherited from class repast.simphony.query.WithinDistance
query, query
-
-
-
-
Constructor Detail
-
ContinuousWithin
public ContinuousWithin(Context<T> context, T obj, double distance)
Creates a ContinuousWithin query that will find all the objects within the specified distance of the specified object in all the continuous spaces in the specified context.- Parameters:
context
-obj
-distance
-
-
ContinuousWithin
public ContinuousWithin(ContinuousSpace<T> space, T obj, double distance)
Creates a ContinuousWithin query that will find all the objects within the specified distance of the specified object in the specified space.- Parameters:
space
-obj
-distance
-
-
-
Method Detail
-
createIterable
protected Iterable<T> createIterable()
Creates an iterable over all the objects within the specified distance in the space.- Specified by:
createIterable
in classWithinDistance<T>
- Returns:
- an iterable over all the objects within the specified distance in the space.
-
createIterable
protected Iterable<T> createIterable(Context<T> context)
Creates an iterable over all the objects within the specified distance in all the continuoous spaces in the context.- Specified by:
createIterable
in classWithinDistance<T>
- Parameters:
context
-- Returns:
- an iterable over all the objects within the specified distance in all the continuoous spaces in the context.
-
-