The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

$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

Insert an entry into the tree

\$tree->delete(\$key)

Delete one entry which is equal to \$key

\$size = \$tree->size

Get the number of entries in the tree

$found_value = \$tree->find(\$key)

Get the entry which is equal to \$key.

$key_value_ret = \$tree->find_lt(\$key)

Get the largest entry which is smaller than \$key.

$key_value_ret = \$tree->find_le(\$key)

Get the largest entry which is smaller than or equal to \$key.

$key_value_ret = \$tree->find_gt(\$key)

Get the smallest entry which is greater than \$key.

$key_value_ret = \$tree->find_ge(\$key)

Get the smallest entry which is greater than or equal to \$key.

$key_value_ret = \$tree->find_min

Get the smallest entry.

$key_value_ret = \$tree->find_max

Get the largest entry.

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

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

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

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

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

How many entries which is smaller than \$key.

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

How many entries which is greater than \$key.

\$tree->dump

Print the whole tree to STDOUT. For debug use.

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

Check the tree property. For debug use.