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 ,
boolean me )
allowDuplicates
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| allowDuplicates | .false | boolean |
Properties
| Property | Type | Description |
|---|---|---|
| put | function | |
| rebalance | function | |
| rotateLeft | function | |
| rotateRight | function | |
| tree | BinarySearchTree | |
| type | type | |
| updateBalance | function |
Methods
put()
Description
Prototype
AVLTreevar.put (
AVLTree ,
anyvalue me,
type(*) key )
data
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| key | None | anyvalue | |
| data | None | type(*) |
rebalance()
Description
Prototype
AVLTreevar.rebalance (
AVLTree ,
TreeNode me )
node
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| node | None | TreeNode |
rotateLeft()
Description
Prototype
AVLTreevar.rotateLeft (
AVLTree ,
TreeNode me )
rotRoot
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| rotRoot | None | TreeNode |
rotateRight()
Description
Prototype
AVLTreevar.rotateRight (
AVLTree ,
TreeNode me )
rotRoot
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| rotRoot | None | TreeNode |
updateBalance()
Description
Prototype
AVLTreevar.updateBalance (
AVLTree ,
TreeNode me )
node
Parameters
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| me | None | AVLTree | |
| node | None | TreeNode |


