Package org.ddolib.layered.modeling
Class DominanceChecker<T>
java.lang.Object
org.ddolib.layered.modeling.DominanceChecker<T>
- Type Parameters:
T- the type of states
- Direct Known Subclasses:
DefaultDominanceChecker,MispDominanceChecker,SimpleDominanceChecker
Object that, given a dominance, will check if a state is dominated.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDominanceChecker(Dominance<T> dominance) Creates a new dominance checker relying on the given dominance relation. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the dominance checker state.abstract booleanupdateDominance(T state, int depth, double objValue) Checks whether the input state is dominated and updates the front of non-dominated nodes.
-
Field Details
-
dominance
The dominance relation used to compare states.
-
-
Constructor Details
-
DominanceChecker
Creates a new dominance checker relying on the given dominance relation.- Parameters:
dominance- the dominance relation used to compare states
-
-
Method Details
-
updateDominance
Checks whether the input state is dominated and updates the front of non-dominated nodes.- Parameters:
state- the state on which test dominancedepth- the depth of the state in the MDDobjValue- the length of the longest path from the root to the input state- Returns:
- whether the input state is dominated
-
clear
public void clear()Clears the dominance checker state. This is useful for search algorithms that restart and need to clear previously cached dominance relations.
-