public class NodeRule extends Node
Class for management a rule node. Internal Node. It's evaluated to a pair integer/weight
Constructor and Description |
---|
NodeRule(NodeAssert assert1,
NodeConsequent consequent,
double w)
Constructor.
|
NodeRule(NodeRule n)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Node |
clone()
This method clones a node rule
|
protected boolean |
compatibleData(Node n)
This method evaluates if two nodes are the same type
|
IntDouble |
CrispEval()
This method evaluates the weight and the consequent of a rule
|
void |
debug()
This method is for debug
|
java.lang.String |
output()
This method is for debug
|
void |
set(NodeRule n)
This method sets a rule node from another one
|
changeChild, child, children, compatible, nChildren, replaceTerminals, set, type
public NodeRule(NodeAssert assert1, NodeConsequent consequent, double w)
Constructor. Generates a new rule node
assert1
- The rule antecedentconsequent
- The rule consequentw
- The weightpublic NodeRule(NodeRule n)
Constructor. Generates a new rule node from another one
n
- The rule nodepublic void set(NodeRule n)
This method sets a rule node from another one
n
- The rule nodeprotected boolean compatibleData(Node n)
This method evaluates if two nodes are the same type
compatibleData
in class Node
n
- The node to be compared (Node)public Node clone()
This method clones a node rule
public IntDouble CrispEval()
This method evaluates the weight and the consequent of a rule