Package repast.simphony.engine.graph
Class NetworkTraverser<T>
- java.lang.Object
-
- repast.simphony.engine.graph.NetworkTraverser<T>
-
-
Constructor Summary
Constructors Constructor Description NetworkTraverser(Network<T> topology)
Constructs this traverser with the specified network topology to retrieve information from.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDistance(T previousNode, T currentNode)
Retrieves the distance between the nodes according to the topology.Iterator<T>
getSuccessors(T previousNode, T currentNode)
Retrieves what the current node's nearest neighbors excluding the previous node.
-
-
-
Method Detail
-
getSuccessors
public Iterator<T> getSuccessors(T previousNode, T currentNode)
Retrieves what the current node's nearest neighbors excluding the previous node.- Specified by:
getSuccessors
in interfaceTraverser<T>
- Returns:
- the current node's nearest neighbors not including the previous node
- See Also:
GraphParams
-
getDistance
public double getDistance(T previousNode, T currentNode)
Retrieves the distance between the nodes according to the topology.- Specified by:
getDistance
in interfaceTraverser<T>
- Returns:
- the distance between the nodes
-
-