Learn R Programming

cppcontainers (version 1.0.4)

bucket_count: Get the number of buckets

Description

Obtain the container's number of buckets.

Usage

bucket_count(x)

Value

Returns the container's number of buckets.

Arguments

x

A CppUnorderedSet, CppUnorderedMultiset, CppUnorderedMap, CppUnorderedMultimap object.

See Also

max_bucket_count, load_factor, size.

Examples

Run this code
s <- cpp_unordered_set(6:10)
s
# 10 9 8 7 6

bucket_count(s)
# [1] 13

Run the code above in your browser using DataLab