Home Manual Reference Source Repository

Function

Static Public Summary
public

UnbalancedBST1(compare: *)

public

avlbalance(P: *)

public

find(compare: *, node: *, value: *): *

public

inordertraversal(callback: *, node: *)

public

insert(compare: *, A: *, B: *): *

public

insertwithparent(compare: *, A: *, B: *): *

public

leftrotate(A: *): *

public
public

max(node: *): *

public

min(node: *): *

public

predecessor(compare: *, node: *, value: *, pred: *): *

Finds the greatest value in the binary search tree which is smaller than parameter value.

public

range(compare: *, node: *, value: *, iterators: *): *

public

rbinsertfixup(z: node)

public

remove(compare: *, node: *, value: *): *

public

replace(compare: *, A: *, B: *): *

public

rightrotate(B: *): *

public
public

successor(compare: *, node: *, value: *, succ: *): *

Finds the smallest value in the binary search tree which is greater than parameter value.

public

treeinsert(compare: *, tree: *, node: *)

Static Private Summary
private

__SplayTree1__(diff: *): *

private

__SplayTree2__(diff: *): *

private

__SplayTree3__(diff: *): *

private

__SplayTree4__(diff: *): *

private

__SplayTree5__(diff: *): *

Static Public

public UnbalancedBST1(compare: *) source

Params:

NameTypeAttributeDescription
compare *

public avlbalance(P: *) source

-> https://en.wikipedia.org/wiki/AVL_tree

Params:

NameTypeAttributeDescription
P *

public find(compare: *, node: *, value: *): * source

Params:

NameTypeAttributeDescription
compare *
node *
value *

Return:

*

public inordertraversal(callback: *, node: *) source

Params:

NameTypeAttributeDescription
callback *
node *

public insert(compare: *, A: *, B: *): * source

Params:

NameTypeAttributeDescription
compare *
A *
B *

Return:

*

public insertwithparent(compare: *, A: *, B: *): * source

Params:

NameTypeAttributeDescription
compare *
A *
B *

Return:

*

public leftrotate(A: *): * source

-> https://en.wikipedia.org/wiki/Tree_rotation

 A                B
/ \              / \

a B -> A c / \ / \ b c a b

Params:

NameTypeAttributeDescription
A *

Return:

*

public leftrotatewithparent(A: *): * source

-> https://en.wikipedia.org/wiki/Tree_rotation

 A                B
/ \              / \

a B -> A c / \ / \ b c a b

Params:

NameTypeAttributeDescription
A *

Return:

*

public max(node: *): * source

Params:

NameTypeAttributeDescription
node *

Return:

*

public min(node: *): * source

Params:

NameTypeAttributeDescription
node *

Return:

*

public predecessor(compare: *, node: *, value: *, pred: *): * source

Finds the greatest value in the binary search tree which is smaller than parameter value.

Params:

NameTypeAttributeDescription
compare *
node *
value *
pred *

Return:

*

public range(compare: *, node: *, value: *, iterators: *): * source

Params:

NameTypeAttributeDescription
compare *
node *
value *
iterators *

Return:

*

public rbinsertfixup(z: node) source

Params:

NameTypeAttributeDescription
z node

the node to fix, z is RED

public remove(compare: *, node: *, value: *): * source

Params:

NameTypeAttributeDescription
compare *
node *
value *

Return:

*

public replace(compare: *, A: *, B: *): * source

Params:

NameTypeAttributeDescription
compare *
A *
B *

Return:

*

public rightrotate(B: *): * source

-> https://en.wikipedia.org/wiki/Tree_rotation

 B                A
/ \              / \

A c -> a B / \ / \ a b b c

Params:

NameTypeAttributeDescription
B *

Return:

*

public rightrotatewithparent(B: *): * source

-> https://en.wikipedia.org/wiki/Tree_rotation

 B                A
/ \              / \

A c -> a B / \ / \ a b b c

Params:

NameTypeAttributeDescription
B *

Return:

*

public successor(compare: *, node: *, value: *, succ: *): * source

Finds the smallest value in the binary search tree which is greater than parameter value.

Params:

NameTypeAttributeDescription
compare *
node *
value *
succ *

Return:

*

public treeinsert(compare: *, tree: *, node: *) source

Params:

NameTypeAttributeDescription
compare *
tree *
node *

Static Private

private __SplayTree1__(diff: *): * source

Params:

NameTypeAttributeDescription
diff *

Return:

*

private __SplayTree2__(diff: *): * source

Params:

NameTypeAttributeDescription
diff *

Return:

*

private __SplayTree3__(diff: *): * source

Params:

NameTypeAttributeDescription
diff *

Return:

*

private __SplayTree4__(diff: *): * source

Params:

NameTypeAttributeDescription
diff *

Return:

*

private __SplayTree5__(diff: *): * source

Params:

NameTypeAttributeDescription
diff *

Return:

*