Package repast.simphony.engine.graph
Class NetworkTraverser<T>
java.lang.Object
repast.simphony.engine.graph.NetworkTraverser<T>
- All Implemented Interfaces:
Traverser<T>
A traverser for Repast Topologies.
- Author:
- Jerry Vos
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkTraverser(Network<T> topology) Constructs this traverser with the specified network topology to retrieve information from. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistance(T previousNode, T currentNode) Retrieves the distance between the nodes according to the topology.getSuccessors(T previousNode, T currentNode) Retrieves what the current node's nearest neighbors excluding the previous node.
-
Constructor Details
-
NetworkTraverser
Constructs this traverser with the specified network topology to retrieve information from.- Parameters:
topology- the topology that will be the source of information on passed in nodes
-
-
Method Details
-
getSuccessors
Retrieves what the current node's nearest neighbors excluding the previous node.- Specified by:
getSuccessorsin interfaceTraverser<T>- Returns:
- the current node's nearest neighbors not including the previous node
- See Also:
-
getDistance
Retrieves the distance between the nodes according to the topology.- Specified by:
getDistancein interfaceTraverser<T>- Returns:
- the distance between the nodes
-