Learn R Programming

cppcontainers (version 1.0.4)

rehash: Set minimum bucket count and rehash

Description

Set a container's minimum bucket count and rehash by reference.

Usage

rehash(x, n = 0)

Value

Invisibly returns NULL.

Arguments

x

A CppUnorderedSet, CppUnorderedMultiset, CppUnorderedMap, or CppUnorderedMultimap object.

n

The minimum number of buckets. A value of 0 forces an unconditional rehash.

See Also

bucket_count, load_factor, max_bucket_count, max_load_factor, reserve.

Examples

Run this code
s <- cpp_unordered_set(4:6)
rehash(s)
rehash(s, 3)

Run the code above in your browser using DataLab