|
__init__(self,
parent,
name,
label=None,
data=None,
level=0,
isTerminal=0)
constructor |
source code
|
|
|
NameTree(self,
varNames)
Set the names of each node in the tree from a list of variable names. |
source code
|
|
|
NameModel(self,
varNames)
Set the names of each node in the tree from a list of variable names. |
source code
|
|
|
|
|
AddChild(self,
name,
label=None,
data=None,
isTerminal=0)
Creates a new TreeNode and adds a child to the tree |
source code
|
|
|
|
|
|
|
GetChildren(self)
Returns a python list of the children of this node |
source code
|
|
|
Destroy(self)
Destroys this node and all of its children |
source code
|
|
|
GetName(self)
Returns the name of this node |
source code
|
|
|
SetName(self,
name)
Sets the name of this node |
source code
|
|
|
GetData(self)
Returns the data stored at this node |
source code
|
|
|
SetData(self,
data)
Sets the data stored at this node |
source code
|
|
|
GetTerminal(self)
Returns whether or not this node is terminal |
source code
|
|
|
SetTerminal(self,
isTerminal)
Sets whether or not this node is terminal |
source code
|
|
|
GetLabel(self)
Returns the label of this node |
source code
|
|
|
SetLabel(self,
label)
Sets the label of this node (should be an integer) |
source code
|
|
|
GetLevel(self)
Returns the level of this node |
source code
|
|
|
SetLevel(self,
level)
Sets the level of this node |
source code
|
|
|
GetParent(self)
Returns the parent of this node |
source code
|
|
|
SetParent(self,
parent)
Sets the parent of this node |
source code
|
|
|
|
|
Pickle(self,
fileName='foo.pkl')
Pickles the tree and writes it to disk |
source code
|
|
|
|
|
|
|
|
|
|