Class FixedWidth<T>
java.lang.Object
org.ddolib.ddo.core.heuristics.width.FixedWidth<T>
- Type Parameters:
T- the type of state for which the width is calculated
- All Implemented Interfaces:
WidthHeuristic<T>
Implements a static maximum width heuristic for decision diagram or search-based algorithms.
This heuristic always returns a fixed maximum width for any state, regardless of the depth or characteristics of the state. It can be used to restrict the size of a decision diagram (DD) or a layer in a search algorithm.
-
Constructor Summary
ConstructorsConstructorDescriptionFixedWidth(int w) Constructs a newFixedWidthheuristic with the specified maximum width. -
Method Summary
Modifier and TypeMethodDescriptionintmaximumWidth(T state) Returns the maximum width for the given state.
-
Constructor Details
-
FixedWidth
public FixedWidth(int w) Constructs a newFixedWidthheuristic with the specified maximum width.- Parameters:
w- the fixed maximum width
-
-
Method Details
-
maximumWidth
Returns the maximum width for the given state.Since this is a fixed-width heuristic, the same value
wis returned for every state.- Specified by:
maximumWidthin interfaceWidthHeuristic<T>- Parameters:
state- the state (ignored in this heuristic)- Returns:
- the fixed maximum width
-