nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / AVLTree

AVLTree

Full name Microsoft.VisualBasic.ComponentModel.Algorithm.BinaryTree.AVLTree`2 Assembly Microsoft.VisualBasic.Runtime Members 5

The AVL binary tree operator. the binbox key is K and value data type is V.

00 Remarks

http://www.cnblogs.com/huangxincheng/archive/2012/07/22/2603956.html

Type Parameters
NameDescription
K
V

01 Syntax

Microsoft.VisualBasic.ComponentModel.Algorithm.BinaryTree.AVLTree`2

02 Methods

NameOverloadsSummary
.ctor 1 Create an instance of the AVL binary tree.
Add 1 add key related value into current tree
Find 1 This function will returns nothing if term not found in current tree.
Remove 2

03 Members

method .ctor #
#ctor(Comparison(Of `0), Func(Of `0, String))

Create an instance of the AVL binary tree.

Remarks

the binbox key is K and value data type is V.

Parameters
NameTypeDescription
comparesComparison(Of `0)

compares(newKey, treeKey):

Compare between two keys. This comparison function should returns:

  • 0, means two keys are equals.
  • 1, means a is greater than b.
  • -1, means a is smaller than b.
viewsFunc(Of `0, String)

Display the key as string

method Add #
Add(`0, `1, Boolean)

add key related value into current tree

Remarks

get cluster value collection via the tree node values data

Parameters
NameTypeDescription
key`0

-

value`1

-

valueReplaceBoolean

-

method Find #
Find(`0)

This function will returns nothing if term not found in current tree.

Parameters
NameTypeDescription
term`0

-

method Remove overload 2 #
Remove(K)
method Remove #