public abstract class Decision<V extends Variable> extends Object implements Identity, ICause, Comparable<Decision<V>>
Modifier and Type | Field and Description |
---|---|
static int |
_ID |
protected int |
branch |
protected boolean |
once |
protected Decision |
previous |
protected V |
var |
Constructor and Description |
---|
Decision() |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply()
Apply the current decision
|
void |
buildNext()
Build the refutation, hasNext() must be called before
|
int |
compareTo(Decision<V> o) |
Decision<V> |
duplicate() |
abstract void |
free()
Free the decision, ie, it can be reused
|
abstract DecisionOperator<V> |
getDecisionOperator() |
abstract Object |
getDecisionValue()
Return the value object involves in the decision
|
V |
getDecisionVariable()
Return the variable object involves in the decision
|
int |
getId() |
Decision |
getPrevious()
Return the previous decision applied in the tree search
|
int |
getWorldIndex() |
boolean |
hasNext()
Return true if the decision can be refuted
|
void |
once(boolean once)
Should this decision be a one-shot decision, non refutable.
|
void |
reverse()
Reverse the decision operator
|
void |
rewind()
Force the decision to be in its creation state.
|
protected void |
set(V var) |
void |
setPrevious(Decision decision)
Set the previous decision applied in the tree search
|
void |
setWorldIndex(int wi) |
int |
triesLeft()
Return the number of branches left to try
|
public static int _ID
protected int branch
protected Decision previous
protected boolean once
public void setPrevious(Decision decision)
decision
- previous decisionpublic Decision getPrevious()
public void setWorldIndex(int wi)
public int getWorldIndex()
public boolean hasNext()
public void buildNext()
public int triesLeft()
public void once(boolean once)
once
- a booleanprotected void set(V var)
public abstract void apply() throws ContradictionException
ContradictionException
public void rewind()
public V getDecisionVariable()
public abstract Object getDecisionValue()
public abstract DecisionOperator<V> getDecisionOperator()
public abstract void free()
public void reverse()
Copyright © 2015. All rights reserved.