public class ArithmeticSolutionNode extends AbstractSolutionNode
Modifier and Type | Field and Description |
---|---|
private boolean |
solutionFlag |
nodesCreated
Constructor and Description |
---|
ArithmeticSolutionNode(Arithmetic clause,
RuleSet rules,
SubstitutionSet parentSolution,
AbstractSolutionNode parentNode)
Constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
SubstitutionSet |
nextSolution()
Creates the next solution for the arithmetic expression of the node.
|
protected void |
reset(SubstitutionSet newParentSolution,
RuleSet newRuleSet)
Resets the subtree to the new state of the database and resets all the
counters that prevent from infinite evaluation of the node.
|
currentRuleCount, getClause, getCurrentRule, getDeepestLeaf, getParentNode, getParentSolution, getRuleSet, hasNextRule, nextRule, setDeepestLeaf
public ArithmeticSolutionNode(Arithmetic clause, RuleSet rules, SubstitutionSet parentSolution, AbstractSolutionNode parentNode)
clause
- the arithmetic expression to be proved by this subtree.rules
- the rules representing context of the proof.parentSolution
- the solution of the parent node in the tree of proof.protected void reset(SubstitutionSet newParentSolution, RuleSet newRuleSet)
reset
in class AbstractSolutionNode
newParentSolution
- the new parent solution of the subtree.newRuleSet
- the new state of the database.AbstractSolutionNode.reset(model.SubstitutionSet,
model.RuleSet)
public SubstitutionSet nextSolution()
null
if there no other different
solution.nextSolution
in class AbstractSolutionNode
SubstitutionSet
object representing the bindings of the
next solution or null
if there is no next solution.AbstractSolutionNode.nextSolution()