Constructor. Pass in an array of elements, or individual elements to initialize the tree with.
Constructor. Pass in a range of elements to initialize the tree with.
The last element in the container
Removes all elements from the container.
The front element in the container
Get a range from the container with all elements that are == e according to the less comparator
Insert a single element in the container. Note that this does not invalidate any ranges currently iterating the container.
Insert a range of elements in the container. Note that this does not invalidate any ranges currently iterating the container.
Get a range from the container with all elements that are < e according to the less comparator
in operator. Check to see if the given element exists in the container.
Compares two trees for equality.
Fetch a range that spans all the elements in the container.
Removes elements from the container that are equal to the given values according to the less comparator. One element is removed for each value given which is in the container. If allowDuplicates is true, duplicates are removed only if duplicate values are given.
Remove an element from the container and return its value.
Remove the back element from the container.
Remove the front element from the container.
Get a range from the container with all elements that are > e according to the less comparator
Check if any elements exist in the container. Returns false if at least one element exists.
Returns the number of elements in the container.
All inserts, removes, searches, and any function in general has complexity of O(lg(n)).
To use a different comparison than "a < b", pass a different operator string that can be used by std.functional.binaryFun, or pass in a function, delegate, functor, or any type where less(a, b) results in a bool value.
Note that less should produce a strict ordering. That is, for two unequal elements a and b, less(a, b) == !less(b, a). less(a, a) should always equal false.
If allowDuplicates is set to true, then inserting the same element more than once continues to add more elements. If it is false, duplicate elements are ignored on insertion. If duplicates are allowed, then new elements are inserted after all existing duplicate elements.