public abstract class AbstractStrategy<V extends Variable> extends Object implements Serializable
AbstractStrategy
does not implicitly advance to the next decision on
getDecision()
(or getOppositeDecision()
) invokation.
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOGGER |
protected V[] |
vars |
Modifier | Constructor and Description |
---|---|
protected |
AbstractStrategy(V[] variables) |
Modifier and Type | Method and Description |
---|---|
Decision<V> |
computeDecision(V var)
Computes a decision to be applied to variable var
This method should be implemented in order to use search patterns
|
abstract Decision<V> |
getDecision()
Provides access to the current decision in the strategy.
|
V[] |
getVariables() |
abstract void |
init()
Prepare
this to be used in a search loop |
String |
toString()
Creates a
String object containing a pretty print of the current variables. |
protected AbstractStrategy(V[] variables)
public abstract void init() throws ContradictionException
this
to be used in a search loopContradictionException
public abstract Decision<V> getDecision()
null
.public String toString()
String
object containing a pretty print of the current variables.public Decision<V> computeDecision(V var)
var
- a variablepublic V[] getVariables()
Copyright © 2015. All rights reserved.