Standard Template Library Programmer's Guide
Здесь есть возможность читать онлайн «Standard Template Library Programmer's Guide» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: Программирование, Справочники, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.
- Название:Standard Template Library Programmer's Guide
- Автор:
- Жанр:
- Год:неизвестен
- ISBN:нет данных
- Рейтинг книги:4 / 5. Голосов: 1
-
Избранное:Добавить в избранное
- Отзывы:
-
Ваша оценка:
- 80
- 1
- 2
- 3
- 4
- 5
Standard Template Library Programmer's Guide: краткое содержание, описание и аннотация
Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Standard Template Library Programmer's Guide»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.
Standard Template Library Programmer's Guide — читать онлайн бесплатно полную книгу (весь текст) целиком
Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Standard Template Library Programmer's Guide», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.
Интервал:
Закладка:
t
Object of type X::value_type
k
Object of type X::key_type
p, q
Object of type X::iterator
n
Object of type X::size_type
h
Object of type X::hasher
c
Object of type X::key_equal
In addition to the expressions defined in Hashed Associative Container and Unique Associative Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|
Range constructor | X(i, j) X a(i, j); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with bucket count | X(i, j, n) X a(i, j, n); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with hash function | X(i, j, n, h) X a(i, j, n, h); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with key equal | X(i, j, n, h, k) X a(i, j, n, h, k); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Range constructor | X(i, j) X a(i, j); |
[i,j) is a valid range. | Creates an associative container that contains all of the elements in the range [i,j) that have unique keys, using hasher() as the hash function and key_equal() as the key equality function. | size() is less than or equal to the distance from i to j . The bucket count is an unspecified default value. The hash function is hasher() , and the key equality function is key_equal() . |
Range constructor with bucket count | X(i, j, n) X a(i, j, n); |
[i,j) is a valid range. | Creates an associative container that contains all of the elements in the range [i,j) that have unique keys, using at least n buckets, and using hasher() as the hash function and key_equal() as the key equality function. | size() is less than or equal to the distance from i to j . The bucket count is greater than or equal to n . The hash function is hasher() , and the key equality function is key_equal() . |
Range constructor with hash function | X(i, j, n, h) X a(i, j, n, h); |
[i,j) is a valid range. | Creates an associative container that contains all of the elements in the range [i,j) that have unique keys, using at least n buckets, and using h as the hash function and key_equal() as the key equality function. | size() is less than or equal to the distance from i to j . The bucket count is greater than or equal to n . The hash function is h , and the key equality function is key_equal() . |
Range constructor with key equal | X(i, j, n, h, k) X a(i, j, n, h, k); |
[i,j) is a valid range. | Creates an associative container that contains all of the elements in the range [i,j) that have unique keys, using at least n buckets, and using h as the hash function and k as the key equality function. | size() is less than or equal to the distance from i to j . The bucket count is greater than or equal to n . The hash function is h , and the key equality function is k . |
The range constructor, range constructor with bucket count, range constructor with hash function, and range constructor with key equal, are all linear in j – i .
• hash_set
• hash_map
[1] At present (early 1998), not all compilers support "member templates". If your compiler supports member templates then i and j may be of any type that conforms to the Input Iterator requirements. If your compiler does not yet support member templates, however, then i and j must be of type const T* or of type X::const_iterator .
Associative Container, Hashed Associative Container, Multiple Hashed Associative Container Sorted Associative Container
Multiple Hashed Associative Container
Category: containers
Component type: concept
A Multiple Hashed Associative Container is a Hashed Associative Container that is also a Multiple Associative Container. That is, it is a Hashed Associative Container
with the property that any number of elements in the container may have the same key
Hashed Associative Container, Multiple Associative Container
None, except for those described in the Hashed Associative Container and Multiple Associative Container requirements.
X
A type that is a model of Hashed Associative Container
a
Object of type X
t
Object of type X::value_type
k
Object of type X::key_type
p, q
Object of type X::iterator
n
Object of type X::size_type
h
Object of type X::hasher
c
Object of type X::key_equal
In addition to the expressions defined in Hashed Associative Container and and Multiple Associative Container, the following expressions must be valid.
Name | Expression | Type requirements | Return type |
---|---|---|---|
Range constructor | X(i, j) X a(i, j); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with bucket count | X(i, j, n) X a(i, j, n); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with hash function | X(i, j, n, h) X a(i, j, n, h); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Range constructor with key equal | X(i, j, n, h, k) X a(i, j, n, h, k); |
i and j are Input Iterators whose value type is convertible to T [1]. | X |
Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Range constructor | X(i, j) X a(i, j); |
[i,j) is a valid range. | Creates an associative container that contains all elements in the range [i,j) , using hasher() as the hash function and key_equal() as the key equality function. | size() is equal to the distance from i to j . The bucket count is an unspecified default value. The hash function is hasher() , and the key equality function is key_equal() . |
Range constructor with bucket count | X(i, j, n) X a(i, j, n); |
[i,j) is a valid range. | Creates an associative container that contains all elements in the range [i,j) , using at least n buckets, and using hasher() as the hash function and key_equal() as the key equality function. | size() is equal to the distance from i to j . The bucket count is greater than or equal to n . The hash function is hasher() , and the key equality function is key_equal() . |
Range constructor with hash function | X(i, j, n, h) X a(i, j, n, h); |
[i,j) is a valid range. | Creates an associative container that contains all elements in the range [i,j) , using at least n buckets, and using h as the hash function and key_equal() as the key equality function. size() is equal to the distance from i to j . | The bucket count is greater than or equal to n . The hash function is h , and the key equality function is key_equal() . |
Range constructor with key equal | X(i, j, n, h, k) X a(i, j, n, h, k); |
[i,j) is a valid range. | Creates an associative container that contains all elements in the range [i,j) , using at least n buckets, and using h as the hash function and k as the key equality function. | size() is equal to the distance from i to j . The bucket count is greater than or equal to n . The hash function is h , and the key equality function is k . |
The range constructor, range constructor with bucket count, range constructor with hash function, and range constructor with key equal, are all linear in j – i .
Читать дальшеИнтервал:
Закладка:
Похожие книги на «Standard Template Library Programmer's Guide»
Представляем Вашему вниманию похожие книги на «Standard Template Library Programmer's Guide» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.
Обсуждение, отзывы о книге «Standard Template Library Programmer's Guide» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.