std::unordered_map::reserve
De cppreference.com
<metanoindex/>
<tbody> </tbody> void reserve( size_type count ); |
(desde C++11) | |
Define o número de baldes para o número necessário para acomodar, pelo menos, elementos
count sem exceder fator de carga máxima e rehashes o recipiente, ou seja, coloca os elementos em baldes apropriados, considerando que o número total de baldes mudou. Efetivamente chama rehash(std::ceil(count / max_load_factor())).Original:
Sets the number of buckets to the number needed to accomodate at least
count elements without exceeding maximum load factor and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. Effectively calls rehash(std::ceil(count / max_load_factor())).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.
Parâmetros
| count | - | nova capacidade do recipiente
Original: new capacity of the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valor de retorno
(Nenhum)
Original:
(none)
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.
Complexidade
caso médio linear no tamanho do recipiente quadrática pior caso,.
Original:
average case linear in the size of the container, worst case quadratic.
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.
