|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjildt.TildeNode
public class TildeNode
Class that implements a node in a Logical Decision Tree. A node can be either an inner node or a leaf.
Constructor Summary | |
---|---|
TildeNode(jason.asSyntax.Term label)
Initializes an inner node. |
|
TildeNode(jason.asSyntax.Term label,
jason.asSyntax.ListTerm examples)
Initializes an inner node. |
Method Summary | |
---|---|
jason.asSyntax.ListTerm |
getExamples()
|
jason.asSyntax.Term |
getLabel()
Returns the label of this node.The label can be either a literal or a conjunction of literals. |
TildeNode |
getLeftNode()
Returns the child node located at the left. |
TildeNode |
getRightNode()
Returns the child node located at the right. |
int |
getSizeExamples()
Return the number of examples used to calculate the label of this node. |
boolean |
isInner()
Check if this node is an inner node. |
boolean |
isLeaf()
Check if this node is a leaf node. |
static TildeNode |
parseTree(jason.asSyntax.Term tree)
Parses a Term tree into a Java Oriented-Object tree. |
static jason.asSyntax.Term |
parseTree2List(TildeNode node)
Parses a Java Oriented-Object tree into a Term tree. |
void |
setExamples(jason.asSyntax.ListTerm lstExs)
|
void |
setLabel(jason.asSyntax.Term label)
Set the label of this node.The label can be either a literal or a conjunction of literals. |
void |
setLeftNode(TildeNode leftNode)
Set the child node that will be located at the left of this node. |
void |
setRightNode(TildeNode rightNode)
Set the child node that will be located at the right of this node. |
java.lang.String |
toString()
Returns a String summarizing the information of this node. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TildeNode(jason.asSyntax.Term label, jason.asSyntax.ListTerm examples)
label
- The label of the current node. Can be either a literal or a conjunction of literals.examples
- The list of examples belonging to this node.public TildeNode(jason.asSyntax.Term label)
label
- The label of the current node. Can be either a literal or a conjunction of literals.Method Detail |
---|
public boolean isInner()
public boolean isLeaf()
public jason.asSyntax.Term getLabel()
public void setLabel(jason.asSyntax.Term label)
label
- A String with the label of this node.public TildeNode getRightNode()
public void setRightNode(TildeNode rightNode)
rightNode
- A node that can be either an internal node or a leaf.public TildeNode getLeftNode()
public void setLeftNode(TildeNode leftNode)
leftNode
- A node that can be either an internal node or a leaf.public java.lang.String toString()
toString
in class java.lang.Object
public int getSizeExamples()
public static TildeNode parseTree(jason.asSyntax.Term tree)
tree
- The tree to be parsed.
public static jason.asSyntax.Term parseTree2List(TildeNode node)
node
- Instance of TildeNode to be parsed.
public jason.asSyntax.ListTerm getExamples()
public void setExamples(jason.asSyntax.ListTerm lstExs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |