std::multiset
Definido no cabeçalho <set>
|
||
template< class Key, |
||
std::multiset
é um contêiner associativo que contém um conjunto ordenado de objetos do tipo Key. Diferentemente do set, são permitidas múltiplas chaves com valores equivalentes. A ordenação é feita usando a função de comparação de chaves Compare. As operações de pesquisar, inserir, e remover têm complexidade logarítmica.
Onde a biblioteca padrão usa os requerimentos de Compare, a equivalência é determinada usando a relação de equivalência descrita em Compare. Em termos inexatos, dois objetos a
e b
são considerados equivalentes se nenhum dos dois compara menor do que o outro: !comp(a, b) && !comp(b, a)
.
A ordem dos elementos que comparam equivalentemente é a ordem de inserção, que não muda. (desde C++11)
std::multiset
cumpre os requisitos de Container, AllocatorAwareContainer, AssociativeContainer e ReversibleContainer.
Índice |
[editar] Tipos de membro
Tipo de membro | Definição |
key_type
|
Key
|
value_type
|
Key
|
size_type
|
Tipo integral sem sinal (geralmente size_t)
Original: Unsigned integral type (usually size_t) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
difference_type
|
tipo inteiro com sinal (geralmente ptrdiff_t)
Original: Signed integer type (usually The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
key_compare
|
Compare
|
value_compare
|
Compare
|
allocator_type
|
Allocator
|
reference
|
Allocator::reference (até C++11)value_type& (desde C++11)
|
const_reference
|
Allocator::const_reference (até C++11)const value_type& (desde C++11)
|
pointer
|
Allocator::pointer (até C++11)std::allocator_traits<Allocator>::pointer (desde C++11) |
const_pointer
|
Allocator::const_pointer (até C++11) std::allocator_traits<Allocator>::const_pointer (desde C++11) |
iterator
|
BidirectionalIterator (até C++11) iterador (desde C++11)Constant bidirecional Original: The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
const_iterator
|
Iterador bidirecional constante
Original: Constant bidirectional iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
reverse_iterator
|
std::reverse_iterator<iterator> |
const_reverse_iterator
|
std::reverse_iterator<const_iterator> |
[editar] Funções membro
constrói o multiset Original: constructs the multiset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
destrói o multiset Original: destructs the multiset The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
atribui valores para o recipiente Original: assigns values to the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna o alocador de associado Original: returns the associated allocator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
Iteradores | |
retorna um iterador para o começo Original: returns an iterator to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna um iterador para o fim Original: returns an iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click |