Interface WidthHeuristic<T>
- Type Parameters:
T- the type of state used to compute the layer width
- All Known Implementing Classes:
FixedWidth,NbUnassignedWidth,TSPTWWidth
public interface WidthHeuristic<T>
Interface for heuristics that determine the maximum width of a layer in a multi-valued decision
diagram (MDD).
Implementations of this interface define how the width of a layer is calculated based on the given state. The maximum width can depend on the state, the depth of the layer, or be a fixed value, depending on the heuristic.
-
Method Summary
Modifier and TypeMethodDescriptionintmaximumWidth(T state) Computes the maximum width allowed for a layer rooted at the given state.default intmaximumWidth(T state, int depth) Computes the maximum width allowed for the decision diagrams compiled from a subproblem, given its state and its depth (the number of variables already assigned).
-
Method Details
-
maximumWidth
Computes the maximum width allowed for a layer rooted at the given state.- Parameters:
state- the state at the root of the layer- Returns:
- the maximum width for the layer
-
maximumWidth
Computes the maximum width allowed for the decision diagrams compiled from a subproblem, given its state and its depth (the number of variables already assigned). The solvers call this method; by default, it ignores the depth and returnsmaximumWidth(Object).- Parameters:
state- the state of the subproblemdepth- the depth of the subproblem, i.e. its number of assigned variables- Returns:
- the maximum width for the layers of the decision diagrams
-