Class NetPathWithin<T>

java.lang.Object
repast.simphony.query.space.graph.NetPathWithin<T>
All Implemented Interfaces:
Query<T>

public class NetPathWithin<T> extends Object implements Query<T>
A Query that returns all nodes within some given path length of a specified node. "Within" includes the upper limit.
Version:
$Revision$ $Date$
Author:
Nick Collier
  • Constructor Summary

    Constructors
    Constructor
    Description
    NetPathWithin(Context<T> context, T obj, double distance)
    Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in all the networks in the specified context.
    NetPathWithin(Network<T> network, T obj, double distance)
    Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in the specified network.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets an iterable over all the nodes within the path length of the target node as specified in the constructor.
    Gets an iterable over all the nodes within the path length of the target node as specified in the constructor AND where those nodes are members of the iterable parameter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NetPathWithin

      public NetPathWithin(Context<T> context, T obj, double distance)
      Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in all the networks in the specified context.
      Parameters:
      context -
      obj -
      distance -
    • NetPathWithin

      public NetPathWithin(Network<T> network, T obj, double distance)
      Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in the specified network.
      Parameters:
      network -
      obj -
      distance -
  • Method Details

    • query

      public Iterable<T> query()
      Gets an iterable over all the nodes within the path length of the target node as specified in the constructor.
      Specified by:
      query in interface Query<T>
      Returns:
      an iterable over all the nodes with the path length of the target node as specified in the constructor.
    • query

      public Iterable<T> query(Iterable<T> set)
      Gets an iterable over all the nodes within the path length of the target node as specified in the constructor AND where those nodes are members of the iterable parameter.
      Specified by:
      query in interface Query<T>
      Parameters:
      set -
      Returns:
      an iterable over all the nodes within the path length of the target node as specified in the constructor AND where those nodes are members of the iterable parameter.