rehash: Set minimum bucket count and rehash

rehashR Documentation

Set minimum bucket count and rehash

Description

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

Usage

rehash(x, n = 0)

Arguments

x

A CppUnorderedSet, CppUnorderedMultiset, CppUnorderedMap, or CppUnorderedMultimap object.

n

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

Value

Invisibly returns NULL.

See Also

bucket_count, load_factor, max_bucket_count, max_load_factor, reserve.

Examples

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


cppcontainers documentation built on Sept. 9, 2025, 5:55 p.m.