operator=,!=(std::unordered_map)
Материал из cppreference.com
< cpp | container | unordered map
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| template< class Key, class T, class Hash, class KeyEqual, class Allocator > void operator=( unordered_map<Key,T,Hash,KeyEqual,Allocator> &lhs, |
(1) | |
| template< class Key, class T, class Hash, class KeyEqual, class Allocator > void operator!=( unordered_map<Key,T,Hash,KeyEqual,Allocator> &lhs, |
(2) | |
Сравнивает содержимое двух неупорядоченных контейнеров.
Original:
Compares the contents of two unordered containers.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Содержимое двух контейнеров неупорядоченный
lhs и rhs эквивалентны, если выполняются следующие условия:Original:
The contents of two unordered containers
lhs and rhs are equivalent if the following conditions hold:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- lhs.size() == rhs.size()
- каждая группа эквивалентных ключей
[lhs_eq1, lhs_eq2)имеет соответствующую группу эквивалентных ключей в других[rhs_eq1, rhs_eq2)контейнер, который имеет следующие свойства:Original: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:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- std::distance(lhs_eq1, lhs_eq2) == std::distance(rhs_eq1, rhs_eq2).
- std::is_permutation(lhs_eq1, lhs_eq2, rhs_eq1) == true.
[править] Параметры
| lhs, rhs | - | неупорядоченных контейнеров для сравнения
Original: unordered containers to compare The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[править] Возвращаемое значение
1)true если содержимое контейнера эквивалентны, false иначе
2) Original:
true if the contents of the containers are equivalent, false otherwise
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
true если содержимое контейнера не эквивалентны, false иначе
Original:
true if the contents of the containers are not equivalent, false otherwise
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[править] Сложность
N comparisons of the keys in the average case, N2 in the worst case, where N is the size of the container.