DefaultVariableHeuristic

org.ddolibscala.tools.ddo.heuristics.variables.DefaultVariableHeuristic

A default implementation of VariableHeuristic that selects the next variable to branch on without applying any specific strategy.

This heuristic simply returns the first element obtained from the provided variables iterable. Therefore, it does not guarantee any particular or deterministic order, as the iteration order of an iterable.

This class serves as a minimal or placeholder heuristic to ensure that the compilation or search process can proceed when no specific variable ordering rule has been defined by the user.

Type parameters

T

the type representing the problem state

Attributes

Graph
Supertypes
trait VariableHeuristic[T]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def next(variables: Iterable[Int], states: Iterable[T]): Int

Selects the next variable to branch on given the current set of unassigned variables and the states of the next layer.

Selects the next variable to branch on given the current set of unassigned variables and the states of the next layer.

The heuristic can analyze the provided states to estimate which variable will best separate or discriminate the search space, improving pruning or convergence. If no meaningful decision can be made, null may be returned to indicate that the choice should be deferred or decided by a default mechanism.

Value parameters

states

an iterator over the current states in the next layer

variables

the set of variable indices that are still unassigned

Attributes

Returns

the index of the next variable to branch on, or null if no decision can be made at this point

Definition Classes

Inherited methods

final override def nextVariable(variables: Set[Integer], states: Iterator[T]): Integer

Used by the solver. Converts the input and output of next from Java to Scala and vice versa.

Used by the solver. Converts the input and output of next from Java to Scala and vice versa.

Attributes

Definition Classes
VariableHeuristic -> VariableHeuristic
Inherited from:
VariableHeuristic