orbtree
|
Map implementation with compact storage. Simple version for weight functions that return one component (i.e. scalar functions). See orbtree and orbtreemap for description of members. More...
#include <orbtree.h>
Map implementation with compact storage. Simple version for weight functions that return one component (i.e. scalar functions). See orbtree and orbtreemap for description of members.
Key | Key to sort elements by. |
Value | Value stored in elements. |
NVFunc | function object calculating the weights associated with stored elements. Requires operator() with the key as the only parameter and returning NVFunc::result_type that should be a public typedef as well. |
IndexType | unsigned integral type to use for indexing. Maximum number of elements is half of the maximum value of this type - 1. Default is uin32_t, i.e. 32-bit integers, allowing 2^31-1 elements. |
Compare | comparison functor for keys. |
Note: internally, it uses realloc_vector::vector if both Key and Value are trivially copyable (as per std::is_trivially_copyable) and stacked_vector::vector otherwise. In the latter case, performnace can be improved by using the libdivide library – see the documentation of stacked_vector for more details.