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
  • Constructor Details

    • 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 Details

    • createIterable

      protected Iterable<T> createIterable()
      Creates an iterable over all the objects within the specified distance in the space.
      Specified by:
      createIterable in class WithinDistance<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 class WithinDistance<T>
      Parameters:
      context -
      Returns:
      an iterable over all the objects within the specified distance in all the continuoous spaces in the context.