edu.washington.cs.supple.render
Class DefaultShortcutCostFunction

java.lang.Object
  extended byedu.washington.cs.supple.render.DefaultShortcutCostFunction
All Implemented Interfaces:
ShortcutCostFunction

public class DefaultShortcutCostFunction
extends java.lang.Object
implements ShortcutCostFunction

Author:
kgajos the default implementation of the shortcut cost function

Field Summary
protected  GraphTransitionCount transitionCount
           
 
Constructor Summary
DefaultShortcutCostFunction()
           
DefaultShortcutCostFunction(GraphTransitionCount tc)
          Creates an instance of the shortcut cost function based on a transition count object that will keep providing up-to-date estimates of transitions through shortcuts as different rendering options are considered
 
Method Summary
 float getShortcutCost(Shortcut shortcut)
          The signature for this method will probably change at some point; it computes the cost associated with a particular shortcut.
 GraphTransitionCount getTransitionCount()
           
 void setTransitionCount(GraphTransitionCount count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transitionCount

protected GraphTransitionCount transitionCount
Constructor Detail

DefaultShortcutCostFunction

public DefaultShortcutCostFunction(GraphTransitionCount tc)
Creates an instance of the shortcut cost function based on a transition count object that will keep providing up-to-date estimates of transitions through shortcuts as different rendering options are considered

Parameters:
tc - a graph transition count

DefaultShortcutCostFunction

public DefaultShortcutCostFunction()
Method Detail

getShortcutCost

public float getShortcutCost(Shortcut shortcut)
Description copied from interface: ShortcutCostFunction
The signature for this method will probably change at some point; it computes the cost associated with a particular shortcut. At the moment it assumes a fixed cost per access regardless of how the shortcut is rendered. This is clearly wrong but we will worry about it later

Specified by:
getShortcutCost in interface ShortcutCostFunction
Parameters:
shortcut - shortcut to be evaluated
Returns:
the associated cost (which depends on how much traffic goes through the shortcut)

getTransitionCount

public GraphTransitionCount getTransitionCount()
Specified by:
getTransitionCount in interface ShortcutCostFunction
Returns:

setTransitionCount

public void setTransitionCount(GraphTransitionCount count)
Specified by:
setTransitionCount in interface ShortcutCostFunction
Parameters:
count -