public class NodeVariable extends NodeExprArit
Class for management nodes with the number of the variable and the value of the variable. Internal Node. It's evaluated to a real number
Constructor and Description |
---|
NodeVariable(int n)
Constructor.
|
NodeVariable(NodeVariable n)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FuzzyAlphaCut |
Beval()
This method returns the fuzzy alpha cut
|
Node |
clone()
This method clones a variable node
|
protected boolean |
compatibleData(Node n)
This method evaluates if two nodes are the same type
|
double |
CrispEval()
This method calculates the center of mass of the fuzzy alpha cuts
|
void |
debug()
This method is for debug
|
int |
getN()
This method returns the variable number
|
java.lang.String |
output()
Returns the output of the node.
|
void |
replaceTerminals(FuzzyAlphaCut[] x)
This method replaces the fuzzy alpla cuts in a especified node
|
void |
set(NodeVariable n)
This method sets a variable node to another one
|
changeChild, child, children, compatible, nChildren, set, type
public NodeVariable(int n)
Constructor. Generates a new variable node
n
- The number (index) for the new variablepublic NodeVariable(NodeVariable n)
Constructor. Generates a new variable node from another one
n
- The variable nodepublic void set(NodeVariable n)
This method sets a variable node to another one
n
- The variable node to be assignedprotected boolean compatibleData(Node n)
This method evaluates if two nodes are the same type
compatibleData
in class Node
n
- The nodepublic Node clone()
This method clones a variable node
clone
in class NodeExprArit
public double CrispEval()
This method calculates the center of mass of the fuzzy alpha cuts
public FuzzyAlphaCut Beval()
This method returns the fuzzy alpha cut
Beval
in class NodeExprArit
public void replaceTerminals(FuzzyAlphaCut[] x)
This method replaces the fuzzy alpla cuts in a especified node
replaceTerminals
in class Node
x
- The new fuzzy alpha cutspublic java.lang.String output()
Returns the output of the node.
public int getN()
This method returns the variable number