Class MispDominance
In this context, one state state1 is considered dominated by another state
state2 if all vertices selected in state1 are also selected in state2. This
allows pruning suboptimal states during the search.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MispDominance
public MispDominance()Creates a new instance of this dominance rule.
-
-
Method Details
-
getKey
Returns a key for the dominance relation.This implementation always returns
0: all the states of a layer share the same key. A key groups the states that can be compared, and must thus be equal for a state and the states dominating it. With a dominance by inclusion, such states do not share any property that could be used as key (neither the set of vertices nor its size), so that a single group is needed.This has a cost: with a
SimpleDominanceChecker, each new state is compared with all the non-dominated states of its layer, i.e. a number of comparisons quadratic in the number of states of a layer, each comparison taking a time linear in the number of vertices.MispDominanceCheckerreduces this cost by grouping the states by their number of remaining vertices. -
isDominatedOrEqual
Determines whetherstate1is dominated by or equal tostate2.A state
state1is dominated bystate2if all vertices selected instate1are also selected instate2.- Specified by:
isDominatedOrEqualin interfaceDominance<BitSet>- Parameters:
state1- the first state to comparestate2- the second state to compare- Returns:
trueifstate1is dominated by or equal tostate2,falseotherwise
-