NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
unordered_multiset< Value, HashFcn, EqualKey, Alloc > 模板类 参考

无序多重集合容器 更多...

#include <unordered_multiset.hpp>

Public 类型

using key_type = typename base_type::key_type
 键类型
using value_type = typename base_type::value_type
 值类型
using hasher = typename base_type::hasher
 哈希函数类型
using key_equal = typename base_type::key_equal
 键相等比较函数类型
using size_type = typename base_type::size_type
 大小类型
using difference_type = typename base_type::difference_type
 差值类型
using pointer = typename base_type::const_pointer
 指针类型
using const_pointer = typename base_type::const_pointer
 常量指针类型
using reference = typename base_type::const_reference
 引用类型
using const_reference = typename base_type::const_reference
 常量引用类型
using iterator = typename base_type::iterator
 迭代器类型
using const_iterator = typename base_type::const_iterator
 常量迭代器类型
using allocator_type = typename base_type::allocator_type
 分配器类型

Public 成员函数

 unordered_multiset ()
 默认构造函数
 unordered_multiset (size_type n)
 构造函数,指定初始桶数
 unordered_multiset (size_type n, const hasher &hf)
 构造函数,指定初始桶数和哈希函数
 unordered_multiset (size_type n, const hasher &hf, const key_equal &eql)
 构造函数,指定初始桶数、哈希函数和键相等比较函数
 unordered_multiset (const unordered_multiset &other)
 拷贝构造函数
unordered_multisetoperator= (const unordered_multiset &other)
 拷贝赋值运算符
 unordered_multiset (unordered_multiset &&other) noexcept(is_nothrow_move_constructible_v< base_type >)
 移动构造函数
unordered_multisetoperator= (unordered_multiset &&other) noexcept(is_nothrow_move_assignable_v< base_type >)
 移动赋值运算符
template<typename Iterator>
 unordered_multiset (Iterator first, Iterator last)
 范围构造函数
template<typename Iterator>
 unordered_multiset (Iterator first, Iterator list, size_type n)
 范围构造函数,指定初始桶数
template<typename Iterator>
 unordered_multiset (Iterator first, Iterator last, size_type n, const hasher &hf)
 范围构造函数,指定初始桶数和哈希函数
template<typename Iterator>
 unordered_multiset (Iterator first, Iterator last, size_type n, const hasher &hf, const key_equal &eql)
 范围构造函数,指定初始桶数、哈希函数和键相等比较函数
 unordered_multiset (std::initializer_list< value_type > ilist)
 初始化列表构造函数
 unordered_multiset (std::initializer_list< value_type > ilist, size_type n)
 初始化列表构造函数,指定初始桶数
 unordered_multiset (std::initializer_list< value_type > ilist, size_type n, const hasher &hf)
 初始化列表构造函数,指定初始桶数和哈希函数
 unordered_multiset (std::initializer_list< value_type > ilist, size_type n, const hasher &hf, const key_equal &eql)
 初始化列表构造函数,指定初始桶数、哈希函数和键相等比较函数
NEFORCE_NODISCARD iterator begin () noexcept
 获取起始迭代器
NEFORCE_NODISCARD iterator end () noexcept
 获取结束迭代器
NEFORCE_NODISCARD const_iterator begin () const noexcept
 获取常量起始迭代器
NEFORCE_NODISCARD const_iterator end () const noexcept
 获取常量结束迭代器
NEFORCE_NODISCARD const_iterator cbegin () const noexcept
 获取常量起始迭代器
NEFORCE_NODISCARD const_iterator cend () const noexcept
 获取常量结束迭代器
NEFORCE_NODISCARD size_type size () const noexcept
 获取元素数量
NEFORCE_NODISCARD size_type max_size () const noexcept
 获取最大可能大小
NEFORCE_NODISCARD bool empty () const noexcept
 检查是否为空
NEFORCE_NODISCARD size_type count (const key_type &key) const noexcept(noexcept(ht_.count(key)))
 统计具有指定键的元素数量
NEFORCE_NODISCARD size_type buckets_size () const noexcept
 获取桶数量
NEFORCE_NODISCARD size_type buckets_max_count () const noexcept
 获取最大桶数量
NEFORCE_NODISCARD size_type bucket_size (size_type n) const noexcept
 获取指定桶的大小
NEFORCE_NODISCARD hasher hash_func () const noexcept(noexcept(ht_.hash_func()))
 获取哈希函数对象
NEFORCE_NODISCARD key_equal key_eql () const noexcept(noexcept(ht_.key_eql()))
 获取键相等比较函数对象
NEFORCE_NODISCARD float load_factor () const noexcept
 获取当前负载因子
NEFORCE_NODISCARD float max_load_factor () const noexcept
 获取最大负载因子
void max_load_factor (float lf) noexcept
 设置最大负载因子
void rehash (size_type n)
 重新哈希,调整桶数量
void reserve (size_type n)
 预留空间
template<typename... Args>
iterator emplace (Args &&... args)
 在unordered_multiset中就地构造元素
iterator insert (const value_type &value)
 拷贝插入元素
iterator insert (value_type &&value)
 移动插入元素
template<typename Iterator>
void insert (Iterator first, Iterator last)
 范围插入元素
size_type erase (const key_type &key) noexcept
 删除所有具有指定键的元素
void erase (iterator position) noexcept
 删除指定位置的元素
void erase (iterator first, iterator last) noexcept
 删除指定范围内的元素
void clear () noexcept
 清空unordered_multiset
void swap (unordered_multiset &other) noexcept(is_nothrow_swappable_v< base_type >)
 交换两个unordered_multiset的内容
NEFORCE_NODISCARD iterator find (const key_type &key)
 查找具有指定键的元素
NEFORCE_NODISCARD const_iterator find (const key_type &key) const
 查找具有指定键的常量元素
NEFORCE_NODISCARD pair< iterator, iteratorequal_range (const key_type &key)
 获取等于指定键的元素范围
NEFORCE_NODISCARD pair< const_iterator, const_iteratorequal_range (const key_type &key) const
 获取等于指定键的常量元素范围
NEFORCE_NODISCARD bool operator== (const unordered_multiset &rhs) const noexcept(noexcept(ht_==rhs.ht_))
 相等比较操作符
NEFORCE_NODISCARD bool operator< (const unordered_multiset &rhs) const noexcept(noexcept(ht_< rhs.ht_))
 小于比较操作符

详细描述

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
class unordered_multiset< Value, HashFcn, EqualKey, Alloc >

无序多重集合容器

模板参数
Value值类型
HashFcn哈希函数类型,默认为hash<Value>
EqualKey键相等比较函数类型,默认为equal_to<Value>
Alloc分配器类型

unordered_multiset是一种关联容器,存储键值,允许重复键。 元素无序存储,由哈希函数将键映射到桶中。 支持快速的键查找,且允许重复键。底层使用哈希表实现。

在文件 unordered_multiset.hpp37 行定义.

构造及析构函数说明

◆ unordered_multiset() [1/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( )
inline

默认构造函数

构造一个空unordered_multiset,默认初始桶数为100。

在文件 unordered_multiset.hpp71 行定义.

被这些函数引用 operator<(), operator=(), operator=(), operator==(), swap(), unordered_multiset(), unordered_multiset(), unordered_multiset(), unordered_multiset(), unordered_multiset() , 以及 unordered_multiset().

◆ unordered_multiset() [2/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( size_type n)
inlineexplicit

构造函数,指定初始桶数

参数
n初始桶数

在文件 unordered_multiset.hpp78 行定义.

◆ unordered_multiset() [3/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( size_type n,
const hasher & hf )
inline

构造函数,指定初始桶数和哈希函数

参数
n初始桶数
hf哈希函数

在文件 unordered_multiset.hpp86 行定义.

◆ unordered_multiset() [4/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( size_type n,
const hasher & hf,
const key_equal & eql )
inline

构造函数,指定初始桶数、哈希函数和键相等比较函数

参数
n初始桶数
hf哈希函数
eql键相等比较函数

在文件 unordered_multiset.hpp95 行定义.

◆ unordered_multiset() [5/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( const unordered_multiset< Value, HashFcn, EqualKey, Alloc > & other)
inline

拷贝构造函数

参数
other源unordered_multiset

在文件 unordered_multiset.hpp102 行定义.

引用了 unordered_multiset().

◆ unordered_multiset() [6/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( unordered_multiset< Value, HashFcn, EqualKey, Alloc > && other)
inlinenoexcept

移动构造函数

参数
other源unordered_multiset

在文件 unordered_multiset.hpp119 行定义.

引用了 is_nothrow_move_constructible_v, move() , 以及 unordered_multiset().

◆ unordered_multiset() [7/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename Iterator>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( Iterator first,
Iterator last )
inline

范围构造函数

模板参数
Iterator迭代器类型
参数
first起始迭代器
last结束迭代器

在文件 unordered_multiset.hpp139 行定义.

◆ unordered_multiset() [8/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename Iterator>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( Iterator first,
Iterator list,
size_type n )
inline

范围构造函数,指定初始桶数

模板参数
Iterator迭代器类型
参数
first起始迭代器
list结束迭代器
n初始桶数

在文件 unordered_multiset.hpp152 行定义.

◆ unordered_multiset() [9/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename Iterator>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( Iterator first,
Iterator last,
size_type n,
const hasher & hf )
inline

范围构造函数,指定初始桶数和哈希函数

模板参数
Iterator迭代器类型
参数
first起始迭代器
last结束迭代器
n初始桶数
hf哈希函数

在文件 unordered_multiset.hpp166 行定义.

◆ unordered_multiset() [10/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename Iterator>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( Iterator first,
Iterator last,
size_type n,
const hasher & hf,
const key_equal & eql )
inline

范围构造函数,指定初始桶数、哈希函数和键相等比较函数

模板参数
Iterator迭代器类型
参数
first起始迭代器
last结束迭代器
n初始桶数
hf哈希函数
eql键相等比较函数

在文件 unordered_multiset.hpp181 行定义.

◆ unordered_multiset() [11/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( std::initializer_list< value_type > ilist)
inline

初始化列表构造函数

参数
ilist初始化列表

在文件 unordered_multiset.hpp190 行定义.

引用了 begin(), end() , 以及 unordered_multiset().

◆ unordered_multiset() [12/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( std::initializer_list< value_type > ilist,
size_type n )
inline

初始化列表构造函数,指定初始桶数

参数
ilist初始化列表
n初始桶数

在文件 unordered_multiset.hpp198 行定义.

引用了 begin(), end() , 以及 unordered_multiset().

◆ unordered_multiset() [13/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( std::initializer_list< value_type > ilist,
size_type n,
const hasher & hf )
inline

初始化列表构造函数,指定初始桶数和哈希函数

参数
ilist初始化列表
n初始桶数
hf哈希函数

在文件 unordered_multiset.hpp207 行定义.

引用了 begin(), end() , 以及 unordered_multiset().

◆ unordered_multiset() [14/14]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset< Value, HashFcn, EqualKey, Alloc >::unordered_multiset ( std::initializer_list< value_type > ilist,
size_type n,
const hasher & hf,
const key_equal & eql )
inline

初始化列表构造函数,指定初始桶数、哈希函数和键相等比较函数

参数
ilist初始化列表
n初始桶数
hf哈希函数
eql键相等比较函数

在文件 unordered_multiset.hpp217 行定义.

引用了 begin(), end() , 以及 unordered_multiset().

成员函数说明

◆ begin() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD const_iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::begin ( ) const
inlinenoexcept

获取常量起始迭代器

返回
指向第一个元素的常量迭代器

在文件 unordered_multiset.hpp236 行定义.

◆ begin() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::begin ( )
inlinenoexcept

获取起始迭代器

返回
指向第一个元素的迭代器

在文件 unordered_multiset.hpp224 行定义.

被这些函数引用 unordered_multiset(), unordered_multiset(), unordered_multiset() , 以及 unordered_multiset().

◆ bucket_size()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::bucket_size ( size_type n) const
inlinenoexcept

获取指定桶的大小

参数
n桶索引
返回
桶中的元素数量

在文件 unordered_multiset.hpp300 行定义.

◆ buckets_max_count()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::buckets_max_count ( ) const
inlinenoexcept

获取最大桶数量

返回
最大桶数量

在文件 unordered_multiset.hpp293 行定义.

◆ buckets_size()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::buckets_size ( ) const
inlinenoexcept

获取桶数量

返回
桶数量

在文件 unordered_multiset.hpp287 行定义.

◆ cbegin()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD const_iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::cbegin ( ) const
inlinenoexcept

获取常量起始迭代器

返回
指向第一个元素的常量迭代器

在文件 unordered_multiset.hpp248 行定义.

◆ cend()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD const_iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::cend ( ) const
inlinenoexcept

获取常量结束迭代器

返回
指向最后一个元素之后位置的常量迭代器

在文件 unordered_multiset.hpp254 行定义.

◆ count()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::count ( const key_type & key) const
inlinenoexcept

统计具有指定键的元素数量

参数
key要统计的键
返回
匹配的元素数量

在文件 unordered_multiset.hpp279 行定义.

◆ emplace()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename... Args>
iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::emplace ( Args &&... args)
inline

在unordered_multiset中就地构造元素

模板参数
Args构造参数类型
参数
args构造参数
返回
指向插入元素的迭代器

在文件 unordered_multiset.hpp353 行定义.

引用了 forward().

◆ empty()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD bool unordered_multiset< Value, HashFcn, EqualKey, Alloc >::empty ( ) const
inlinenoexcept

检查是否为空

返回
是否为空

在文件 unordered_multiset.hpp272 行定义.

◆ end() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD const_iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::end ( ) const
inlinenoexcept

获取常量结束迭代器

返回
指向最后一个元素之后位置的常量迭代器

在文件 unordered_multiset.hpp242 行定义.

◆ end() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::end ( )
inlinenoexcept

获取结束迭代器

返回
指向最后一个元素之后位置的迭代器

在文件 unordered_multiset.hpp230 行定义.

被这些函数引用 unordered_multiset(), unordered_multiset(), unordered_multiset() , 以及 unordered_multiset().

◆ equal_range() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD pair< iterator, iterator > unordered_multiset< Value, HashFcn, EqualKey, Alloc >::equal_range ( const key_type & key)
inline

获取等于指定键的元素范围

参数
key键值
返回
包含范围起始和结束的pair

在文件 unordered_multiset.hpp432 行定义.

◆ equal_range() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD pair< const_iterator, const_iterator > unordered_multiset< Value, HashFcn, EqualKey, Alloc >::equal_range ( const key_type & key) const
inline

获取等于指定键的常量元素范围

参数
key键值
返回
包含范围起始和结束的pair

在文件 unordered_multiset.hpp439 行定义.

◆ erase() [1/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::erase ( const key_type & key)
inlinenoexcept

删除所有具有指定键的元素

参数
key要删除的键
返回
删除的元素数量

在文件 unordered_multiset.hpp387 行定义.

◆ erase() [2/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::erase ( iterator first,
iterator last )
inlinenoexcept

删除指定范围内的元素

参数
first起始迭代器
last结束迭代器

在文件 unordered_multiset.hpp400 行定义.

◆ erase() [3/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::erase ( iterator position)
inlinenoexcept

删除指定位置的元素

参数
position要删除的位置

在文件 unordered_multiset.hpp393 行定义.

◆ find() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::find ( const key_type & key)
inline

查找具有指定键的元素

参数
key要查找的键
返回
指向第一个匹配元素的迭代器,未找到则返回end()

在文件 unordered_multiset.hpp418 行定义.

◆ find() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD const_iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::find ( const key_type & key) const
inline

查找具有指定键的常量元素

参数
key要查找的键
返回
指向第一个匹配元素的常量迭代器,未找到则返回cend()

在文件 unordered_multiset.hpp425 行定义.

◆ hash_func()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD hasher unordered_multiset< Value, HashFcn, EqualKey, Alloc >::hash_func ( ) const
inlinenoexcept

获取哈希函数对象

返回
哈希函数对象的副本

在文件 unordered_multiset.hpp306 行定义.

引用了 hash_func().

被这些函数引用 hash_func().

◆ insert() [1/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::insert ( const value_type & value)
inline

拷贝插入元素

参数
value要插入的值
返回
指向插入元素的迭代器

在文件 unordered_multiset.hpp362 行定义.

◆ insert() [2/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
template<typename Iterator>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::insert ( Iterator first,
Iterator last )
inline

范围插入元素

模板参数
Iterator迭代器类型
参数
first起始迭代器
last结束迭代器

在文件 unordered_multiset.hpp378 行定义.

◆ insert() [3/3]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
iterator unordered_multiset< Value, HashFcn, EqualKey, Alloc >::insert ( value_type && value)
inline

移动插入元素

参数
value要插入的值
返回
指向插入元素的迭代器

在文件 unordered_multiset.hpp369 行定义.

引用了 move().

◆ key_eql()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD key_equal unordered_multiset< Value, HashFcn, EqualKey, Alloc >::key_eql ( ) const
inlinenoexcept

获取键相等比较函数对象

返回
键相等比较函数对象的副本

在文件 unordered_multiset.hpp312 行定义.

引用了 key_eql().

被这些函数引用 key_eql().

◆ load_factor()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD float unordered_multiset< Value, HashFcn, EqualKey, Alloc >::load_factor ( ) const
inlinenoexcept

获取当前负载因子

返回
负载因子

在文件 unordered_multiset.hpp318 行定义.

◆ max_load_factor() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD float unordered_multiset< Value, HashFcn, EqualKey, Alloc >::max_load_factor ( ) const
inlinenoexcept

获取最大负载因子

返回
最大负载因子

在文件 unordered_multiset.hpp324 行定义.

◆ max_load_factor() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::max_load_factor ( float lf)
inlinenoexcept

设置最大负载因子

参数
lf新的最大负载因子

在文件 unordered_multiset.hpp330 行定义.

◆ max_size()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::max_size ( ) const
inlinenoexcept

获取最大可能大小

返回
最大元素数量

在文件 unordered_multiset.hpp266 行定义.

◆ operator<()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD bool unordered_multiset< Value, HashFcn, EqualKey, Alloc >::operator< ( const unordered_multiset< Value, HashFcn, EqualKey, Alloc > & rhs) const
inlinenoexcept

小于比较操作符

参数
rhs右侧unordered_multiset
返回
按字典序比较结果

在文件 unordered_multiset.hpp457 行定义.

引用了 unordered_multiset().

◆ operator=() [1/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset & unordered_multiset< Value, HashFcn, EqualKey, Alloc >::operator= ( const unordered_multiset< Value, HashFcn, EqualKey, Alloc > & other)
inline

拷贝赋值运算符

参数
other源unordered_multiset
返回
自身引用

在文件 unordered_multiset.hpp110 行定义.

引用了 unordered_multiset().

◆ operator=() [2/2]

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
unordered_multiset & unordered_multiset< Value, HashFcn, EqualKey, Alloc >::operator= ( unordered_multiset< Value, HashFcn, EqualKey, Alloc > && other)
inlinenoexcept

移动赋值运算符

参数
other源unordered_multiset
返回
自身引用

在文件 unordered_multiset.hpp127 行定义.

引用了 is_nothrow_move_assignable_v, move() , 以及 unordered_multiset().

◆ operator==()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD bool unordered_multiset< Value, HashFcn, EqualKey, Alloc >::operator== ( const unordered_multiset< Value, HashFcn, EqualKey, Alloc > & rhs) const
inlinenoexcept

相等比较操作符

参数
rhs右侧unordered_multiset
返回
如果两个unordered_multiset大小相等且对应元素相等返回true

在文件 unordered_multiset.hpp448 行定义.

引用了 unordered_multiset().

◆ rehash()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::rehash ( size_type n)
inline

重新哈希,调整桶数量

参数
n目标桶数量

在文件 unordered_multiset.hpp336 行定义.

◆ reserve()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::reserve ( size_type n)
inline

预留空间

参数
n期望的元素数量

确保unordered_multiset至少能容纳n个元素而不触发rehash。

在文件 unordered_multiset.hpp344 行定义.

◆ size()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
NEFORCE_NODISCARD size_type unordered_multiset< Value, HashFcn, EqualKey, Alloc >::size ( ) const
inlinenoexcept

获取元素数量

返回
unordered_multiset中的元素数量

在文件 unordered_multiset.hpp260 行定义.

◆ swap()

template<typename Value, typename HashFcn = hash<Value>, typename EqualKey = equal_to<Value>, typename Alloc = allocator<hashtable_node<Value>>>
void unordered_multiset< Value, HashFcn, EqualKey, Alloc >::swap ( unordered_multiset< Value, HashFcn, EqualKey, Alloc > & other)
inlinenoexcept

交换两个unordered_multiset的内容

参数
other要交换的另一个unordered_multiset

在文件 unordered_multiset.hpp411 行定义.

引用了 is_nothrow_swappable_v , 以及 unordered_multiset().


该类的文档由以下文件生成: