SIMPOL Documentation

Chapter 87. sortlib

This is a library that implements various sort algorithms, including insertionsort, quicksort,

AVLTree

Description

Type Tags

BinarySearchTree

Object Value

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

AVLTree.new()

Description

Prototype

AVLTree.new ( AVLTree me, boolean allowDuplicates )

Parameters

ParameterDefault valueType nameDescription
meNoneAVLTree
allowDuplicates.falseboolean

Properties

PropertyTypeDescription
putfunction
rebalancefunction
rotateLeftfunction
rotateRightfunction
treeBinarySearchTree
typetype
updateBalancefunction

Methods

put()

Description

Prototype

AVLTreevar.put ( AVLTree me, anyvalue key, type(*) data )

Parameters
ParameterDefault valueType nameDescription
meNoneAVLTree
keyNoneanyvalue
dataNonetype(*)

rebalance()

Description

Prototype

AVLTreevar.rebalance ( AVLTree me, TreeNode node )

Parameters
ParameterDefault valueType nameDescription
meNoneAVLTree
nodeNoneTreeNode

rotateLeft()

Description

Prototype

AVLTreevar.rotateLeft ( AVLTree me, TreeNode rotRoot )

Parameters
ParameterDefault valueType nameDescription
meNoneAVLTree
rotRootNoneTreeNode

rotateRight()

Description

Prototype

AVLTreevar.rotateRight ( AVLTree me, TreeNode rotRoot )

Parameters
ParameterDefault valueType nameDescription
meNoneAVLTree
rotRootNoneTreeNode

updateBalance()

Description

Prototype

AVLTreevar.updateBalance ( AVLTree me, TreeNode node )

Parameters
ParameterDefault valueType nameDescription
meNoneAVLTree
nodeNoneTreeNode