org.grinvin.engine.apengine
Class TreeGenerator
java.lang.Object
org.grinvin.engine.apengine.TreeGenerator
public class TreeGenerator
extends java.lang.Object
completeWorkingTree
protected boolean completeWorkingTree
currentBinaryOperators
protected int currentBinaryOperators
currentUnaryOperators
protected int currentUnaryOperators
TreeGenerator
public TreeGenerator()
TreeGenerator
public TreeGenerator(int unaryOperators,
int binaryOperators)
complete
public boolean complete(LabeledBinaryTree tree)
Is the given
LabeledBinaryTree
complete? A tree is complete if its
amount of unary and binary operators matches the current unary and
binary operator count respectively.
extend
protected void extend()
Try to extend the workingTree.
pushNextOperatorCount
protected void pushNextOperatorCount()
Push a new depthstate on the stack with the next number of unary and binary operators.
The operators are added as follows: