edu.washington.cs.supple.render.search
Class BottomUpSearchSolver
java.lang.Object
edu.washington.cs.supple.render.AbstractSolver
edu.washington.cs.supple.render.search.BottomUpSearchSolver
- All Implemented Interfaces:
- Solver
- Direct Known Subclasses:
- AbstractShortcutSolver
- public class BottomUpSearchSolver
- extends AbstractSolver
- Author:
- kgajos
| Fields inherited from class edu.washington.cs.supple.render.AbstractSolver |
bags, BOTTOM_UP, constraintFactory, costFunction, currentRenderingConstraints, currentRenderingHints, curSearchParameters, curSolution, curSolutionRoot, finalSolutionListeners, interrupted, listener, MRV, propagationLevels, searchCount, SORT_COST, SORT_COST_REVERSE, SORT_RANDOM, spies, TOP_DOWN, valueSorting, variableOrdering, widgetFactory |
|
Method Summary |
boolean |
search(WidgetBag root,
java.util.Vector nodes)
A simple search routine |
protected boolean |
searchDispatch(WidgetBag root,
java.util.Vector nodes)
A convenience method -- subclasses may override it if they need to do
some processing before search procedure is invoked |
Solution |
solve(UiObject object,
java.awt.Dimension sizeConstraint)
The interface for invoking the search routine |
Solution |
solve(UiObject object,
SearchParameters searchParameters,
java.awt.Dimension sizeConstraint)
The interface for invoking the search routine that allows you to override
the search parameters |
protected java.util.Vector |
sortMRV(java.util.Vector w)
|
protected java.util.Vector |
sortWidgets(java.util.Vector w)
|
| Methods inherited from class edu.washington.cs.supple.render.AbstractSolver |
addFinalSolutionListener, addSpy, applyConstraint, applyConstraints, applyCostFunction, applyHint, applyHints, applyRenderingConstraint, applySameRenderingConstraint, applySameRenderingHint, buildBagStructure, getBottomUpNodeList, getLeafNodes, getShortcutCost, getTopDownNodeList, interruptSearch, notifyFinalSolutionListeners, notifySpies, removeFinalSolutionListener, removeSpy, reset, setListener, solutionFound, solutionFound, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
costComparator
protected CostComparator costComparator
mrvComparator
protected MRVComparator mrvComparator
BottomUpSearchSolver
public BottomUpSearchSolver()
solve
public Solution solve(UiObject object,
java.awt.Dimension sizeConstraint)
throws java.lang.InterruptedException
- Description copied from class:
AbstractSolver
- The interface for invoking the search routine
- Specified by:
solve in interface Solver- Specified by:
solve in class AbstractSolver
- Parameters:
object - the description of the UI to be renderedsizeConstraint - the maximum size
- Returns:
- The solved bag structure if all went well; null otherwise
- Throws:
java.lang.InterruptedException
solve
public Solution solve(UiObject object,
SearchParameters searchParameters,
java.awt.Dimension sizeConstraint)
throws java.lang.InterruptedException
- Description copied from class:
AbstractSolver
- The interface for invoking the search routine that allows you to override
the search parameters
- Specified by:
solve in interface Solver- Specified by:
solve in class AbstractSolver
- Parameters:
object - the description of the UI to be renderedsizeConstraint - the maximum sizesearchParameters - hand-set parameters for the search
- Returns:
- The solved bag structure if all went well; null otherwise
- Throws:
java.lang.InterruptedException
searchDispatch
protected boolean searchDispatch(WidgetBag root,
java.util.Vector nodes)
throws java.lang.InterruptedException
- A convenience method -- subclasses may override it if they need to do
some processing before search procedure is invoked
- Parameters:
root - nodes -
- Returns:
-
- Throws:
java.lang.InterruptedException
search
public boolean search(WidgetBag root,
java.util.Vector nodes)
throws java.lang.InterruptedException
- A simple search routine
- Parameters:
nodes - a bottom-up list of nodes to explore
- Returns:
- true if a safisfying assignment was found, false otherwise
- Throws:
java.lang.InterruptedException
sortWidgets
protected java.util.Vector sortWidgets(java.util.Vector w)
sortMRV
protected java.util.Vector sortMRV(java.util.Vector w)