de.cesr.lara.components.decision.impl
Class LAbstractBinaryDecsionTree<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P>
java.lang.Object
de.cesr.lara.components.decision.impl.LAbstractBinaryDecsionTree<A,BO,P>
- Type Parameters:
A
- agent class this decision tree is used byBO
- type of behavioural optionsP
- the parameter class type
- All Implemented Interfaces:
- LaraDecisionTree<A,BO,P>
public abstract class LAbstractBinaryDecsionTree<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P>
- extends Object
- implements LaraDecisionTree<A,BO,P>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
falseTree
protected LaraDecisionTree<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P> falseTree
- This decision tree is evaluated in case evaluate() returns false
trueTree
protected LaraDecisionTree<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P> trueTree
- This decision tree is evaluated in case evaluate() returns true
LAbstractBinaryDecsionTree
public LAbstractBinaryDecsionTree()
LAbstractBinaryDecsionTree
public LAbstractBinaryDecsionTree(LaraDecisionTree<A,BO,P> trueTree,
LaraDecisionTree<A,BO,P> falseTree)
- Init the decision tree with true decision tree and false decision tree.
- Parameters:
trueTree
- This decision tree is evaluated in case evaluate() returns
truefalseTree
- This decision tree is evaluated in case evaluate() returns
false
getBos
public Set<BO> getBos(A agent,
P parameter)
- Description copied from interface:
LaraDecisionTree
- Processes this node of the decision tree.
- Specified by:
getBos
in interface LaraDecisionTree<A extends LaraAgent<A,? super BO>,BO extends LaraBehaviouralOption<?,BO>,P>
- Parameters:
agent
- the LaraAgent
this decision tree is processed forparameter
- the parameter object (decisionBuilder, for instance)
- Returns:
- a set of
LaraBehaviouralOption
s
setFalseDecisionTree
public void setFalseDecisionTree(LaraDecisionTree<A,BO,P> falseTree)
- Parameters:
falseTree
- the decision tree to evaluate when evaluate() returns false
setTrueDecisionTree
public void setTrueDecisionTree(LaraDecisionTree<A,BO,P> trueTree)
- Parameters:
trueTree
- the decision tree to evaluate when evaluate() returns true
evaluate
protected abstract boolean evaluate(A agent,
P parameter)
- Returns:
- false when the false tree shall be evaluated, true if the true
tree shall be evaluated.