edu.washington.cs.supple.render
Class DefaultShortcutCostFunction
java.lang.Object
edu.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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transitionCount
protected GraphTransitionCount transitionCount
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()
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 -