operator=,!=(std::unordered_multiset)
来自cppreference.com
< cpp | container | unordered multiset
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
template< class Key, class Hash, class KeyEqual, class Allocator > void operator=( unordered_multiset<Key,Hash,KeyEqual,Allocator> &lhs, |
(1) | |
template< class Key, class Hash, class KeyEqual, class Allocator > void operator!=( unordered_multiset<Key,Hash,KeyEqual,Allocator> &lhs, |
(2) | |
进行比较的两个内容无序容器.
原文:
Compares the contents of two unordered containers.
两个无序的容器
lhs
rhs
是等价的,如果满足下列条件:1原文:
The contents of two unordered containers
lhs
and rhs
are equivalent if the following conditions hold:- lhs.size() == rhs.size()
- 等价密钥
[lhs_eq1, lhs_eq2)
每个组都有一个对应的组的等价密钥在其他容器[rhs_eq1, rhs_eq2)
,即具有以下属性:原文:each group of equivalent keys[lhs_eq1, lhs_eq2)
has a corresponding group of equivalent keys in the other container[rhs_eq1, rhs_eq2)
, that has the following properties:
- std::distance(lhs_eq1, lhs_eq2) == std::distance(rhs_eq1, rhs_eq2).
- std::is_permutation(lhs_eq1, lhs_eq2, rhs_eq1) == true.
[编辑] 参数
lhs, rhs | - | 无序的容器进行比较
|
[编辑] 返回值
1)true的容器中的内容是否是等效,false否则
2) 原文:
true if the contents of the containers are equivalent, false otherwise
true如果容器的内容是不等价的,false否则
原文:
true if the contents of the containers are not equivalent, false otherwise
[编辑] 复杂性
ΣSi2 comparisons of the keys in the average case, where S is the size of the ith equivalent key group. N2 comparisons of the keys in the worst case, where N is the size of the container.