cs132.dijkstra
Interface EdgeModel<E>

All Known Implementing Classes:
CharacterDistance, StringModel, UnitCost, WebPageCostModel

public interface EdgeModel<E>

This interface allows you to describe a EdgeModel. It is parametermized, so that you can describe, for example, an EdgeModel of WebPage or a EdgeModel of WebPage. The EdgeModel may not represent a complete graph (e.g., there may be no edge from x to y). In the case, the cost(x,y) should return Integer.MAX_VALUE and y should not be contained in getSuccessors(x).


Method Summary
 int cost(E from, E to)
          Provide the cost/weight of the edge from the from element to the to element.
 java.util.Collection<? extends E> getSuccessors(E e)
          Returns a collection of elements to which there is an edge from e.
 

Method Detail

cost

int cost(E from,
         E to)
Provide the cost/weight of the edge from the from element to the to element.


getSuccessors

java.util.Collection<? extends E> getSuccessors(E e)
Returns a collection of elements to which there is an edge from e.



Web Accessibility