std::unordered_set::max_load_factor

std::unordered_set::max_load_factor

float max_load_factor() const;
(1) (since C++11)
void max_load_factor( float ml );
(2) (since C++11)

Manages the maximum load factor (number of elements per bucket). The container automatically increases the number of buckets if the load factor exceeds this threshold.

1) Returns current maximum load factor.

2) Sets the maximum load factor to ml.

Parameters

ml - new maximum load factor setting

Return value

1) current maximum load factor.

2) none.

Complexity

Constant.

See also

returns average number of elements per bucket
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/container/unordered_set/max_load_factor

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部