|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.trace.GraphTransitionCount
| Field Summary | |
protected float[][] |
a
|
protected float[] |
effortMeasure
|
protected int[] |
enterCount
|
protected int[] |
leaveCount
|
protected java.util.Hashtable |
nameToObject
|
protected java.util.Collection |
navShortcuts
|
protected java.util.ArrayList |
nodes
|
protected java.util.Hashtable |
nodesToIndices
|
protected java.util.Collection |
primitiveShortcuts
|
protected WidgetBag |
root
|
protected float |
shortcutEffortEstimate
|
protected java.util.ArrayList |
staticNodes
|
protected int[] |
switchCount
|
protected java.util.Hashtable |
targetNodesToNavShortcuts
|
protected java.util.Hashtable |
targetNodesToPrimitiveShortcuts
|
protected Trace |
trace
|
protected java.util.Hashtable |
uiObjectsToWidgetBags
|
| Constructor Summary | |
GraphTransitionCount(WidgetBag root,
java.util.Collection primitiveShortcuts,
java.util.Collection navShortcuts,
Trace trace)
Initialized the graph structure with the interface description, a set of shortcuts and a trace |
|
| Method Summary | |
java.lang.String |
dumpTransitionTable()
|
protected void |
fillAdjacencyMatrix(java.util.Collection shortcuts)
Fills the adjacency matrix with the info gleaned from the shortcut information; at the moment it assumes nav shortcuts |
protected void |
fillAdjacencyMatrix(WidgetBag root)
Fills adjacency matrix with the information extracted from a widget bag structure |
protected java.util.Vector |
getBestPath(java.lang.String sourceName,
java.lang.String targetName)
A convenience method -- takes element names as inputs instead of the elements themselves |
protected java.util.Vector |
getBestPath(UiObject source,
UiObject target)
Finds the best path from the source to the target; for now it assumes that all shortcuts are visible at all times; will get seriously confused if there is no path between the two... |
protected float |
getEdgeCost(int fromIndex,
int toIndex)
|
float |
getEffortEstimate(UiObject object)
Returns the effort estimate for a leaf node |
int |
getEnterCount(Shortcut shortcut)
Returns the enter count for a shortcut |
int |
getEnterCount(java.lang.String objectName)
|
int |
getEnterCount(UiObject object)
|
UiObject |
getLeafWithHighestEffortEstimate()
Returns non-shortcut leaf with the highest effort estimate |
int |
getLeaveCount(java.lang.String objectName)
|
int |
getLeaveCount(UiObject object)
|
protected int |
getNodeIndex(java.lang.Object node)
Returns the index for a given node object |
protected UiObject |
getObjectForName(java.lang.String name)
|
protected float |
getPathCost(java.util.Vector path)
Returns the cost of following a particular, fully specified, legal path |
protected java.util.Vector |
getPathThroughNavShortcut(UiObject source,
UiObject target)
Finds a path that goes through a shortcut closest to the target |
protected java.util.Vector |
getPathToPrimitiveShortcut(UiObject source,
UiObject target)
returns a path to a primitive shortcut for target |
int |
getSwitchCount(java.lang.String objectName)
|
int |
getSwitchCount(UiObject object)
|
int |
getTotalEffortEstimate()
|
protected WidgetBag |
getWidgetBagForUiObject(UiObject object)
|
protected void |
init()
Initializes the graph data structures |
protected void |
resetCounts()
|
protected void |
updateAdjacencyMatrix(int fromIndex,
int toIndex,
float value)
|
void |
updateGraph()
Updates the weights in the graph in response to the changes in the widget bag structure; assumes that the shortcuts have not changed |
void |
updateNavShortcuts(java.util.Collection shortcuts)
Allows you to set a new list of shortcuts; the entire data structure will be rebuilt in response |
void |
updatePrimitiveShortcuts(java.util.Collection shortcuts)
Allows you to set a new list of shortcuts; the entire data structure will be rebuilt in response |
void |
updateTransitionCounts()
Goes over the trace and computes new transition counts given the current state of the graph |
protected void |
updateTransitionCounts(java.util.Vector path)
Uses information from a single path to increase transition counts of appropriate nodes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected WidgetBag root
protected java.util.Collection navShortcuts
protected java.util.Collection primitiveShortcuts
protected Trace trace
protected java.util.ArrayList nodes
protected java.util.ArrayList staticNodes
protected java.util.Hashtable nodesToIndices
protected java.util.Hashtable targetNodesToNavShortcuts
protected java.util.Hashtable targetNodesToPrimitiveShortcuts
protected java.util.Hashtable uiObjectsToWidgetBags
protected java.util.Hashtable nameToObject
protected float[][] a
protected int[] switchCount
protected int[] enterCount
protected int[] leaveCount
protected float[] effortMeasure
protected float shortcutEffortEstimate
| Constructor Detail |
public GraphTransitionCount(WidgetBag root,
java.util.Collection primitiveShortcuts,
java.util.Collection navShortcuts,
Trace trace)
root - interface description passed through the WidgetBag structuretrace - a trace to be used for calculating transition counts| Method Detail |
protected void init()
protected void resetCounts()
protected void fillAdjacencyMatrix(WidgetBag root)
root - the root of the widget bag sub treeprotected void fillAdjacencyMatrix(java.util.Collection shortcuts)
shortcuts - a collection of shortcuts
protected void updateAdjacencyMatrix(int fromIndex,
int toIndex,
float value)
public void updatePrimitiveShortcuts(java.util.Collection shortcuts)
shortcuts - a list of shortcutspublic void updateNavShortcuts(java.util.Collection shortcuts)
shortcuts - a list of shortcutspublic void updateGraph()
public void updateTransitionCounts()
protected void updateTransitionCounts(java.util.Vector path)
path - a path
protected float getEdgeCost(int fromIndex,
int toIndex)
protected java.util.Vector getBestPath(UiObject source,
UiObject target)
source - source ui elementtarget - target ui element
protected java.util.Vector getBestPath(java.lang.String sourceName,
java.lang.String targetName)
sourceName - name of the source elementtargetName - name of the target element
protected java.util.Vector getPathToPrimitiveShortcut(UiObject source,
UiObject target)
source - sourcetarget - target functionality
protected java.util.Vector getPathThroughNavShortcut(UiObject source,
UiObject target)
source - source nodetarget - target node
protected float getPathCost(java.util.Vector path)
path - a path specified as a vector of ui objects and shortcuts
(including start and end nodes)
protected int getNodeIndex(java.lang.Object node)
node - node object
protected WidgetBag getWidgetBagForUiObject(UiObject object)
protected UiObject getObjectForName(java.lang.String name)
public int getSwitchCount(java.lang.String objectName)
getSwitchCount in interface TransitionCountpublic int getSwitchCount(UiObject object)
getSwitchCount in interface TransitionCountpublic int getEnterCount(java.lang.String objectName)
getEnterCount in interface TransitionCountpublic int getEnterCount(UiObject object)
getEnterCount in interface TransitionCountpublic int getEnterCount(Shortcut shortcut)
shortcut - the shortcut to be checked
public int getLeaveCount(java.lang.String objectName)
getLeaveCount in interface TransitionCountpublic int getLeaveCount(UiObject object)
getLeaveCount in interface TransitionCountpublic float getEffortEstimate(UiObject object)
object - the leaf node
public int getTotalEffortEstimate()
public UiObject getLeafWithHighestEffortEstimate()
public java.lang.String dumpTransitionTable()
dumpTransitionTable in interface TransitionCount
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||