std::unordered_multimap::reserve
Da cppreference.com.
< cpp | container | unordered multimap
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
void reserve( size_type count ); |
(dal C++11) | |
Imposta il numero di secchi per il numero necessario per ospitare almeno elementi
count
senza superare il fattore di carico massimo e rimaneggiamenti del contenitore, cioè mette gli elementi in segmenti appropriati tenuto conto che il numero totale di bucket è cambiato. Chiama efficacemente 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.
Indice |
[modifica] Parametri
count | - | nuova capacità del contenitore
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. |
[modifica] Valore di ritorno
(Nessuno)
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.
[modifica] Complessità
caso medio lineare nella dimensione del, quadratica caso peggiore contenitore.
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.
[modifica] Vedi anche
reserves at least the specified number of buckets. This regenerates the hash table. (metodo pubblico) |