max_load_factor {cppcontainers} | R Documentation |
Get or set the maximum load factor
Description
Get or set the maximum load factor by reference, i.e. the number of elements per bucket.
Usage
max_load_factor(x, max_load = NULL)
Arguments
x |
A CppUnorderedSet, CppUnorderedMultiset, CppUnorderedMap, or CppUnorderedMultimap object. |
max_load |
The containers maximum load factor. If |
Value
Returns a numeric, if max_load
is NULL
. Invisibly returns NULL
, if max_load
is numeric.
See Also
bucket_count, load_factor, max_bucket_count.
Examples
s <- cpp_unordered_set(4:6)
max_load_factor(s)
# [1] 1
max_load_factor(s, 3)
max_load_factor(s)
# [1] 3
[Package cppcontainers version 1.0.0 Index]