cs132.dijkstra
Class CharacterDistance

java.lang.Object
  extended by cs132.dijkstra.WebPageCostModel
      extended by cs132.dijkstra.CharacterDistance
All Implemented Interfaces:
EdgeModel<WebPage>

public class CharacterDistance
extends WebPageCostModel

This provides a cost model for web page links based on the number of characters in the to URL that occur after the common prefix of the two URL's.


Constructor Summary
CharacterDistance()
           
 
Method Summary
 int cost(WebPage from, WebPage to)
          Provide the cost/weight of the edge from the from element to the to element.
 
Methods inherited from class cs132.dijkstra.WebPageCostModel
getSuccessors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterDistance

public CharacterDistance()
Method Detail

cost

public int cost(WebPage from,
                WebPage to)
Description copied from interface: EdgeModel
Provide the cost/weight of the edge from the from element to the to element.



Web Accessibility