org.grinvin.conjecture.engine.apengine

Class ExactTreeGenerator<T,extends,BinaryTree>


public class ExactTreeGenerator<T,extends,BinaryTree>
extends TreeGenerator<T,extends,BinaryTree>

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.conjecture.engine.apengine.TreeGenerator<T,extends,BinaryTree>

TreeGenerator.TreeGeneratorStateStack

Field Summary

Fields inherited from class org.grinvin.conjecture.engine.apengine.TreeGenerator<T,extends,BinaryTree>

completeWorkingTree, currentBinaryOperators, currentUnaryOperators, stateStack, treeFactory, workingTree

Constructor Summary

ExactTreeGenerator(int unaryOperators, int binaryOperators, TreeFactory treeFactory)

Method Summary

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

Methods inherited from class org.grinvin.conjecture.engine.apengine.TreeGenerator<T,extends,BinaryTree>

complete, correct, extend, nextTree, pushNextOperatorCount

Constructor Details

ExactTreeGenerator

public ExactTreeGenerator(int unaryOperators,
                          int binaryOperators,
                          TreeFactory treeFactory)

Method Details

nextTree

public T nextTree()
Return the next LabeledBinaryTree or null when no more tree is available.
Overrides:
nextTree in interface TreeGenerator<T,extends,BinaryTree>

pushNextOperatorCount

protected void pushNextOperatorCount()
Overrides:
pushNextOperatorCount in interface TreeGenerator<T,extends,BinaryTree>