org.grinvin.conjecture.engine.apengine

Class LimitedTreeGenerator<T,extends,BinaryTree>


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

Tree generator that generates trees with at most 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

LimitedTreeGenerator(int maxUnaryOperators, int maxBinaryOperators, 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

LimitedTreeGenerator

public LimitedTreeGenerator(int maxUnaryOperators,
                            int maxBinaryOperators,
                            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>