jildt
Class displayTree
java.lang.Object
jason.asSemantics.DefaultInternalAction
jildt.displayTree
- All Implemented Interfaces:
- jason.asSemantics.InternalAction, java.io.Serializable
public class displayTree
- extends jason.asSemantics.DefaultInternalAction
Internal action to display a view of the learned tree. Trees can be displayed neither in the console
or in a window frame. By default, a learner agent is enabled for displaying the learned tree in the two
possible ways. For setting this option, a literal jildt_settings(displayMode, Opt) is needed, where
Opt ∈ {none, gui,console, both}). When the option none is selected, the learned tree will
not be displayed, even if the internal action is executed. When the option gui is selected, a frame
like the one below is displayed.
When the option console is chosen, a tree like the shown below is printed in console.
clear(Y)
| + yes: clear(X)
| | + yes: success (3 examples)
| | + no: fail (1 examples)
| + no: fail (2 examples)
Option both (default), displays both gui and console modes.
Use:
jildt.displayTree(Plan, Tree)
Parameters:
- + Plan (Literal): the label of the plan which the logical decision tree has been computed for.
- + Tree (List): a list with the tree that is going to be shown. Inner nodes are formed by three
elements: [literal, leftNode, rightNode]; while, leaf nodes can be formed by one or two elements:
[label, number_of_examples] or [label].
Examples: Assuming Tree = [clear(Y), [clear(X), [success, 3], [fail, 1]], [fail,2]], and no changes in
the configuration of displayMode:
-
jildt.displayTree(Plan,Tree)
: Shows and prints the trees showed in the description.
-
jildt.displayTree(Plan,[clear(Y), [success]])
: Throws a parsing exception because of the
structure of the tree.
-
jildt.displayTree(Plan,Tree, X)
: Throws an exception due to only two arguments are needed
for executing the internal action.
-
jildt.displayTree(Plan, tree)
: Throws an exception because the second argument must be a list.
- Author:
- Carlos Alberto González-Alarcón, Alejandro Guerra-Hernández, Francisco Grimaldo-Moreno
- See Also:
TildeNode
,
VisualTree
,
Serialized Form
Method Summary |
java.lang.Object |
execute(jason.asSemantics.TransitionSystem ts,
jason.asSemantics.Unifier un,
jason.asSyntax.Term[] args)
|
int |
getMaxArgs()
|
int |
getMinArgs()
|
Methods inherited from class jason.asSemantics.DefaultInternalAction |
canBeUsedInContext, prepareArguments, suspendIntention |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
displayTree
public displayTree()
execute
public java.lang.Object execute(jason.asSemantics.TransitionSystem ts,
jason.asSemantics.Unifier un,
jason.asSyntax.Term[] args)
throws java.lang.Exception
- Specified by:
execute
in interface jason.asSemantics.InternalAction
- Overrides:
execute
in class jason.asSemantics.DefaultInternalAction
- Throws:
java.lang.Exception
getMinArgs
public int getMinArgs()
- Overrides:
getMinArgs
in class jason.asSemantics.DefaultInternalAction
getMaxArgs
public int getMaxArgs()
- Overrides:
getMaxArgs
in class jason.asSemantics.DefaultInternalAction