public class SetStrategy extends AbstractStrategy<SetVar>
Modifier and Type | Field and Description |
---|---|
protected DecisionOperator<SetVar> |
operator |
protected PoolManager<FastDecisionSet> |
pool |
protected SetValueSelector |
valSelector |
protected VariableSelector<SetVar> |
varSelector |
LOGGER, vars
Constructor and Description |
---|
SetStrategy(SetVar[] scope,
VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst)
Generic strategy to branch on set variables
|
Modifier and Type | Method and Description |
---|---|
Decision<SetVar> |
computeDecision(SetVar s)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
Decision<SetVar> |
getDecision()
Provides access to the current decision in the strategy.
|
void |
init()
Prepare
this to be used in a search loop |
getVariables, toString
protected PoolManager<FastDecisionSet> pool
protected VariableSelector<SetVar> varSelector
protected SetValueSelector valSelector
protected DecisionOperator<SetVar> operator
public SetStrategy(SetVar[] scope, VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst)
scope
- SetVar array to branch onvarS
- variable selection strategyvalS
- integer selection strategyenforceFirst
- branching order true = enforce first; false = remove firstpublic void init() throws ContradictionException
AbstractStrategy
this
to be used in a search loopinit
in class AbstractStrategy<SetVar>
ContradictionException
public Decision<SetVar> getDecision()
AbstractStrategy
null
.getDecision
in class AbstractStrategy<SetVar>
public Decision<SetVar> computeDecision(SetVar s)
AbstractStrategy
computeDecision
in class AbstractStrategy<SetVar>
s
- a variableCopyright © 2015. All rights reserved.