com.samskivert.util
Interface ShortestPath.Graph

Enclosing class:
ShortestPath

public static interface ShortestPath.Graph

A caller must implement this interface to provide the information needed to define the graph and compute the shortest path.


Method Summary
 int computeWeight(Object edge, Object start)
          Returns the weight associated with the supplied edge in the direction established by the supplied starting node.
 Iterator<Object> enumerateNodes()
          Enumerates all nodes in the graph.
 List<Object> getEdges(Object node)
          Returns the list of the edges for the specified node.
 Object getOpposite(Object edge, Object node)
          Returns the node opposite the supplied node on the supplied edge.
 

Method Detail

enumerateNodes

Iterator<Object> enumerateNodes()
Enumerates all nodes in the graph.


getEdges

List<Object> getEdges(Object node)
Returns the list of the edges for the specified node.


computeWeight

int computeWeight(Object edge,
                  Object start)
Returns the weight associated with the supplied edge in the direction established by the supplied starting node.


getOpposite

Object getOpposite(Object edge,
                   Object node)
Returns the node opposite the supplied node on the supplied edge.



Copyright © 2000-2008 Michael Bayne. All Rights Reserved.