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>

public final class FixedWidth<T> extends Object implements 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 Details

    • FixedWidth

      public FixedWidth(int w)
      Constructs a new FixedWidth heuristic with the specified maximum width.
      Parameters:
      w - the fixed maximum width
  • Method Details

    • maximumWidth

      public int maximumWidth(T state)
      Returns the maximum width for the given state.

      Since this is a fixed-width heuristic, the same value w is returned for every state.

      Specified by:
      maximumWidth in interface WidthHeuristic<T>
      Parameters:
      state - the state (ignored in this heuristic)
      Returns:
      the fixed maximum width