$package

$desc

\$tree = $package\->new$new_trailing
\$tree = $long$func_trailing
\$tree = $short$func_trailing

Creat a new empty tree.

\$tree->insert$key_value_arg
\$tree->insert_after$key_value_arg

Insert an entry into the tree. If there are any entries with the same key size, insert the new one after them.

\$tree->insert_before$key_value_arg

Insert an entry into the tree. If there are any entries with the same key size, insert the new one before them.

\$tree->delete(\$key)
\$tree->delete_last(\$key)

Delete one entry whose key is equal to \$key. If there ary more than one entry with the same key size, delete the last inserted one.

\$tree->delete_first(\$key)

Delete one entry whose key is equal to \$key. If there ary more than one entry with the same key size, delete the first inserted one.

\$size = \$tree->size

Get the number of entries in the tree

$key_value_ret = \$tree->find(\$key, \$limit=1)
$key_value_ret = \$tree->find_first(\$key, \$limit=1)

Get entries with key sizes equal to \$key, from the first inserted one to the last inserted one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_last(\$key, \$limit=1)

Get entries with key sizes equal to \$key, from the last inserted one to the first inserted one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_lt(\$key, \$limit=1)

Get entries, whose keys are smaller than \$key, from the largest entry.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_le(\$key, \$limit=1)

Get entries, whose keys are smaller than or equal to \$key, from the largest entry.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_gt(\$key, \$limit=1)

Get entries, whose keys are greater than \$key, from the smallest one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_ge(\$key, \$limit=1)

Get entries, whose keys are greater than or equal to \$key, from the smallest one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_gt_lt(\$lower_key, \$upper_key)

Get entries, whose keys are greater than \$lower_key and smaller than \$upper_key, from the smallest one to the largest one.

$key_value_ret = \$tree->find_gt_le(\$lower_key, \$upper_key)

Get entries, whose keys are greater than \$lower_key and smaller than or equal to \$upper_key, from the smallest one to the largest one.

$key_value_ret = \$tree->find_ge_lt(\$lower_key, \$upper_key)

Get entries, whose keys are greater than or equal to \$lower_key and smaller than \$upper_key, from the smallest one to the largest one.

$key_value_ret = \$tree->find_ge_le(\$lower_key, \$upper_key)

Get entries, whose keys are greater than or equal to \$lower_key and smaller than or equal to \$upper_key, from the smallest one to the largest one.

$key_value_ret = \$tree->find_min(\$limit=1)

Get entries from the one with smallest key. If there are more than one entries with smallest key, begin from the first inserted one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \$tree->find_max(\$limit=1)

Get entries from the one with largest key. If there are more than one entries with smallest key, begin from the last inserted one.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \&tree->skip_l(\$offset, \$limit=1)

Get the first entry from one with the smallest key after skipping \$offset entries.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

$key_value_ret = \&tree->skip_g(\$offset, \$limit=1)

Get the first entry from one with the largest key after skipping \$offset entries.

The optional \$limit (default 1) indicates the maximum entry number you will get, \$limit=-1 means unlimited.

\$count = \$tree->count_lt(\$key)

Get the number of entries whose keys are smaller than \$key.

\$count = \$tree->count_le(\$key)

Get the number of entries whose keys are smaller than or equal to \$key.

\$count = \$tree->count_gt(\$key)

Get the number of entries whose keys are greater than \$key.

\$count = \$tree->count_ge(\$key)

Get the number of entries whose keys are greater than or equal to \$key.

\$dump_str = \$tree->dump

Get a string which represent the whole tree structure. For debug use.

(\$order_consistent, \$size_consistent, \$balanced) = \$tree->check

Check the tree property. For debug use.

\$ever_height = \$tree->ever_height

Get the maximum height the tree has ever been. For debug use