Search
Preparing search index...
The search index is not available
tstruct
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"BinaryTree/AVLTree"
AVLTree
Class AVLTree<T>
Type parameters
T
Hierarchy
BinarySearchTree
<
T
>
AVLTree
Implements
IBinaryTree
<
T
>
IBinarySearchTree
<
T
>
Index
Constructors
constructor
Properties
_head
compare
Function
Accessors
head
max
min
Methods
add
balance
Node
delete
find
Node
insert
Node
left
Right
Rotate
left
Rotate
remove
right
Left
Rotate
right
Rotate
to
Array
value
Exists
Constructors
constructor
new AVLTree
(
compareFunction
?:
CompareFunctionType
<
T
>
)
:
AVLTree
Parameters
Optional
compareFunction:
CompareFunctionType
<
T
>
Returns
AVLTree
Properties
Protected
_head
_head
:
IBinaryTreeNode
<
T
>
Protected
compare
Function
compare
Function
:
CompareFunctionType
<
T
>
= descendingCompareFunction
Accessors
head
get
head
(
)
:
IBinaryTreeNode
<
T
>
Returns
IBinaryTreeNode
<
T
>
max
get
max
(
)
:
T
Returns
T
min
get
min
(
)
:
T
Returns
T
Methods
add
add
(
value
:
T
)
:
void
Parameters
value:
T
Returns
void
Private
balance
Node
balance
Node
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
delete
delete
(
value
:
T
)
:
void
Parameters
value:
T
Returns
void
find
Node
find
Node
(
value
:
T
, node
?:
IBinaryTreeNode
<
T
>
)
:
IBinaryTreeNode
<
T
>
Parameters
value:
T
Default value
node:
IBinaryTreeNode
<
T
>
= this.head
Returns
IBinaryTreeNode
<
T
>
Protected
insert
Node
insert
Node
(
value
:
T
, node
:
IBinaryTreeNode
<
T
>
)
:
IBinaryTreeNode
<
T
>
Parameters
value:
T
node:
IBinaryTreeNode
<
T
>
Returns
IBinaryTreeNode
<
T
>
left
Right
Rotate
left
Right
Rotate
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
left
Rotate
left
Rotate
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
remove
remove
(
value
:
T
)
:
void
Parameters
value:
T
Returns
void
right
Left
Rotate
right
Left
Rotate
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
right
Rotate
right
Rotate
(
node
:
IBinaryTreeNode
<
T
>
)
:
void
Parameters
node:
IBinaryTreeNode
<
T
>
Returns
void
to
Array
to
Array
(
)
:
T
[]
Returns
T
[]
value
Exists
value
Exists
(
value
:
T
)
:
boolean
Parameters
value:
T
Returns
boolean
Globals
"
Binary
Tree/AVLTree"
"
Binary
Tree/
Binary
Search
Tree"
"
Binary
Tree/
Binary
Tree"
"
Common/
Common"
"
Compare
Function"
"
Graph/
Graph"
"
Heap/
Heap"
"
Linked
List/
Linked
List"
"
Queue/
Priority
Queue"
"
Queue/
Queue"
"
Sorting
Algorithms/
Sorting
Algorithms"
"
Stack/
Stack"
"
Trie/
Trie"
"
Union
Find/
Union
Find"
AVLTree
constructor
_head
compare
Function
head
max
min
add
balance
Node
delete
find
Node
insert
Node
left
Right
Rotate
left
Rotate
remove
right
Left
Rotate
right
Rotate
to
Array
value
Exists
Generated using
TypeDoc