Methods

makeRange ( -- range )  returns a range pointing to all elements of the tree

bound ( lowerKey upperKey -- range )  returns a range pointing to all elements with keys within given bounds

clear ( -- )  deletes all entries from the tree

empty ( -- condition )  checks if the tree is empty

endIter ( -- iterator ) ; body ( iter -- continue )  returns an “end” iterator

erase ( key -- )  deletes an entry by its key

eraseIter ( iterator -- )  deletes an entry by its iterator

find ( key -- value exists )  finds an entry by key

findIter ( key -- iterator exists )  finds an iterator by key

first ( -- { key: Key; value: Value; } )  returns the first entry of the tree (the one with the smallest key)

firstIter ( -- iterator )  returns an iterator pointing to the first element (the one with the smallest key)

insert ( key value -- )  inserts a value with a key to the tree

last ( key value -- )  returns the last entry of the tree (the one with the biggest key)

lastIter ( -- iterator )  returns an iterator pointing to the last entry of the tree (the one with the biggest key)

lbound ( key -- range )  returns a range pointing to all elements that are not less than a given key

rbound ( key -- range )  returns a range pointing to all elements that are less than a given key

single ( -- condition )  checks if there is exactly one entry

Free functions

copy ( tree0 -- tree1 )  copies a tree, copying all its entries

enum ( tree body -- )  enumerates all entries in key ascending order using an input function with the possibility to interrupt

enumIter ( tree body -- )  enumerates all iterators in key ascending order using an input function with the possibility to interrupt

makeRedBlackTree ( range -- tree )  creates a tree from a range of pairs (key value), all entries will be aliased

makeRedBlackTree  ( builtinList -- tree)  creates a tree from a builtin-list of pairs (key value), all entries will be aliased

RedBlackTree ( -- tree )  creates an empty RedBlackTree

= ( iterator0 iterator1 -- condition )  checks if iterators point to the same entry

@ ( key tree -- value )  returns an entry by key

! ( value key tree -- )  sets an entry by key

Tags

RED_BLACK_TREE

INDEX_OVERLOAD

CONTAINER