Copyright © (C) 2017-2024, Jan Henry Nystrom <JanHenryNystrom@gmail.com> -------------------------------------------------------------------
Authors: Jan Henry Nystrom (JanHenryNystrom@gmail.com).
default() = term()
flag() = check | nocheck
key() = [term()]
abstract datatype: r_tree()
value() = term()
add/3 | The Value is saved in Tree under the Range, if that key is present the value associated with the key is replaced by Value. |
add/4 | The Value is saved in Tree under the Range, if that key is present the value associated with the key is replaced by Value. |
adds/2 | |
adds/3 | For each {Range, Value} pair in Pairs the value is stored under the Range in the Tree. |
delete/2 | If a value is associated the Range the Tree returned has that association removed. |
delete/3 | If a value is associated the Range the Tree returned has that association removed. |
deletes/2 | A tree that has all the associations for the ranges removed. |
deletes/3 | A tree that has all the associations for the rangess removed. |
find/2 | Returns the value associated with any range that includes the key in the Tree or undefined if no such association exists. |
find/3 | Returns the value associated with any range that includes the key in the Tree or Default if no such association exists. |
from_list/1 | For each {Range, Value} pair in Pairs the value is stored under the key in the Tree. |
is_empty/1 | Returns true if the Tree is empty, false otherwise. |
is_r_tree/1 | Returns true if X is a R-tree, false otherwise. |
member/2 | Returns true if there is a value associated with Range in the tree, otherwise false. |
new/0 | Creates an empty R-tree. |
ranges/1 | Returns all the ranges in ascending order. |
replace/3 | Replaces any existing value associated with Range in the tree, otherwise adds a association for the value with the Range. |
replace/4 | Replaces any existing value associated with Range in the tree, otherwise the flag determines what happens. |
to_list/1 | From a R-tree a list of {Range, Value} pairs. |
values/1 | Returns all the values in ascending order of their ranges. |
The Value is saved in Tree under the Range, if that key is present the value associated with the key is replaced by Value. add(Range, Value, Tree) is equivalent to add(Range, Value, Tree,nocheck).
The Value is saved in Tree under the Range, if that key is present the value associated with the key is replaced by Value. If the flag is check an exception is generated and if nocheck the value is replaced.
For each {Range, Value} pair in Pairs the value is stored under the Range in the Tree. If an Range already has a value associated with in the Tree the flag determines what happens. If the flag is check an exception is generated if a range has a value associated with it, if the flag is nocheck the values will be replaced.
If a value is associated the Range the Tree returned has that association removed. The call delete(Range, Tree) is equivalent to delete(Range, Tree, nocheck).
If a value is associated the Range the Tree returned has that association removed. If there is no value associated with the Range in the Tree the flag determines what happens. If the flag is check an exception is generated if no association exists, if the flag is nocheck the unchanged tree is returned.
A tree that has all the associations for the ranges removed. The call deletes(Ranges, Tree) is equivalent to deletes(Ranges, Tree, nocheck).
A tree that has all the associations for the rangess removed. If there is no value associated with any of the Ranges in the Tree, the flag determines what happens. If the flag is check an exception is generated if, if the flag is nocheck a tree is returned with the other associations removed.
Returns the value associated with any range that includes the key in the Tree or undefined if no such association exists. The call find(Key, Tree) is equivalent to find(Key, Tree, undefined).
Returns the value associated with any range that includes the key in the Tree or Default if no such association exists.
For each {Range, Value} pair in Pairs the value is stored under the key in the Tree.
is_empty(X1::term()) -> boolean()
Returns true if the Tree is empty, false otherwise.
is_r_tree(R_node::term()) -> boolean()
Returns true if X is a R-tree, false otherwise.
Returns true if there is a value associated with Range in the tree, otherwise false.
new() -> r_tree()
Creates an empty R-tree.
Returns all the ranges in ascending order.
Replaces any existing value associated with Range in the tree, otherwise adds a association for the value with the Range. The call replace(Range, Value, Tree) is equivalent to replace(Range, Value, Tree, nocheck).
Replaces any existing value associated with Range in the tree, otherwise the flag determines what happens. If the flag is check an exception is generated, otherwise the value is added.
From a R-tree a list of {Range, Value} pairs.
Returns all the values in ascending order of their ranges.
Generated by EDoc