org.grinvin.engine.apengine

Class ExactTreeGenerator


public class ExactTreeGenerator
extends TreeGenerator

Tree generator that generates trees with exactly the given amount of unary and binary operators.

Nested Class Summary

Nested classes/interfaces inherited from class org.grinvin.engine.apengine.TreeGenerator

TreeGenerator.TreeGeneratorStateStack

Field Summary

Fields inherited from class org.grinvin.engine.apengine.TreeGenerator

completeWorkingTree, currentBinaryOperators, currentUnaryOperators, stateStack, workingTree

Constructor Summary

ExactTreeGenerator(int unaryOperators, int binaryOperators)

Method Summary

LabeledBinaryTree
nextTree()
Return the next LabeledBinaryTree or null when no more tree is available.
protected void
pushNextOperatorCount()

Methods inherited from class org.grinvin.engine.apengine.TreeGenerator

complete, correct, extend, nextTree, pushNextOperatorCount

Constructor Details

ExactTreeGenerator

public ExactTreeGenerator(int unaryOperators,
                          int binaryOperators)

Method Details

nextTree

public LabeledBinaryTree nextTree()
Return the next LabeledBinaryTree or null when no more tree is available.
Overrides:
nextTree in interface TreeGenerator

pushNextOperatorCount

protected void pushNextOperatorCount()
Overrides:
pushNextOperatorCount in interface TreeGenerator