SIMPOL Documentation

TreeNode

Description

Type Tags

TreeNode

Object Value

Objects of type TreeNode have no value, and it is an error to try to get or set this value.

TreeNode.new()

Description

Prototype

TreeNode.new ( TreeNode me, anyvalue key, type(*) data, TreeNode left, TreeNode right, TreeNode parent )

Parameters

ParameterDefault valueType nameDescription
meNoneTreeNode
keyNoneanyvalue
dataNonetype(*)
leftNoneTreeNode
rightNoneTreeNode
parentNoneTreeNode

Properties

PropertyTypeDescription
balanceFactorinteger
datatype(*)
duplistdlist
findMinfunction
findSuccessorfunction
hasAnyChildrenfunction
hasBothChildrenfunction
hasLeftChildfunction
hasRightChildfunction
isLeaffunction
isLeftChildfunction
isRightChildfunction
isRootfunction
keyanyvalue
leftChildTreeNode
parentTreeNode
replaceNodeDatafunction
rightChildTreeNode
spliceOutfunction
typetype

Methods

findMin()

Description

Prototype

TreeNodevar.findMin ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

findSuccessor()

Description

Prototype

TreeNodevar.findSuccessor ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

hasAnyChildren()

Description

Prototype

TreeNodevar.hasAnyChildren ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

hasBothChildren()

Description

Prototype

TreeNodevar.hasBothChildren ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

hasLeftChild()

Description

Prototype

TreeNodevar.hasLeftChild ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

hasRightChild()

Description

Prototype

TreeNodevar.hasRightChild ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

isLeaf()

Description

Prototype

TreeNodevar.isLeaf ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

isLeftChild()

Description

Prototype

TreeNodevar.isLeftChild ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

isRightChild()

Description

Prototype

TreeNodevar.isRightChild ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

isRoot()

Description

Prototype

TreeNodevar.isRoot ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode

replaceNodeData()

Description

Prototype

TreeNodevar.replaceNodeData ( TreeNode me, anyvalue key, type(*) data, TreeNode leftChild, TreeNode rightChild )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode
keyNoneanyvalue
dataNonetype(*)
leftChildNoneTreeNode
rightChildNoneTreeNode

spliceOut()

Description

Prototype

TreeNodevar.spliceOut ( TreeNode me )

Parameters
ParameterDefault valueType nameDescription
meNoneTreeNode