|
2293 | 2293 | \item \tcode{n} denotes a value of type \tcode{size_type},
|
2294 | 2294 | \item \tcode{z} denotes a value of type \tcode{float}, and
|
2295 | 2295 | \item \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}.
|
| 2296 | +\item \tcode{hk} and \tcode{hke} denote values of type \tcode{size_t}. |
2296 | 2297 | \end{itemize}
|
2297 | 2298 |
|
2298 | 2299 | % Local command to index names as members of all unordered containers.
|
|
2746 | 2747 | & Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
|
2747 | 2748 | \\ \rowsep
|
2748 | 2749 | %
|
| 2750 | +\tcode{b.find(k, hk)} |
| 2751 | +& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{b}. |
| 2752 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2753 | + \returns an iterator pointing to an element with key equivalent to |
| 2754 | + \tcode{k}, or \tcode{b.end()} if no such element exists. |
| 2755 | +& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}. |
| 2756 | +\\ \rowsep |
| 2757 | +% |
2749 | 2758 | \tcode{a_tran.find(ke)}
|
2750 | 2759 | & \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}.
|
2751 | 2760 | & Returns an iterator pointing to an element with key equivalent to
|
2752 | 2761 | \tcode{ke}, or \tcode{a_tran.end()} if no such element exists.%
|
2753 | 2762 | & Average case \bigoh{1},
|
2754 |
| - worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid wverfull |
| 2763 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2764 | +\\ \rowsep |
| 2765 | +% |
| 2766 | +\tcode{a_tran.find(ke, hke)} |
| 2767 | +& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}. |
| 2768 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2769 | + \returns an iterator pointing to an element with key equivalent to |
| 2770 | + \tcode{ke}, or \tcode{a_tran.end()} if no such element exists.% |
| 2771 | +& Average case \bigoh{1}, |
| 2772 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
2755 | 2773 | \\ \rowsep
|
2756 | 2774 | %
|
2757 | 2775 | \indexunordmem{count}%
|
|
2761 | 2779 | & Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}.
|
2762 | 2780 | \\ \rowsep
|
2763 | 2781 | %
|
| 2782 | +\tcode{b.count(k, hk)} |
| 2783 | +& \tcode{size_type} |
| 2784 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2785 | + \returns the number of elements with key equivalent to \tcode{k}.% |
| 2786 | +& Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}. |
| 2787 | +\\ \rowsep |
| 2788 | +% |
2764 | 2789 | \tcode{a_tran.count(ke)}
|
2765 | 2790 | & \tcode{size_type}
|
2766 | 2791 | & Returns the number of elements with key equivalent to \tcode{ke}.%
|
|
2769 | 2794 | worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2770 | 2795 | \\ \rowsep
|
2771 | 2796 | %
|
| 2797 | +\tcode{a_tran.count(ke, hke)} |
| 2798 | +& \tcode{size_type} |
| 2799 | +& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br |
| 2800 | + \returns the number of elements with key equivalent to \tcode{ke}.% |
| 2801 | +& Average case |
| 2802 | + \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}, % avoid overfull |
| 2803 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2804 | +\\ \rowsep |
| 2805 | +% |
2772 | 2806 | \indexunordmem{contains}%
|
2773 | 2807 | \tcode{b.contains(k)}
|
2774 | 2808 | & \tcode{bool}
|
2775 |
| -& Equivalent to \tcode{b.find(k) != b.end()}% |
| 2809 | +& \effects Equivalent to \tcode{b.find(k) != b.end()}% |
| 2810 | +& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}. |
| 2811 | +\\ \rowsep |
| 2812 | +% |
| 2813 | +\tcode{b.contains(k, hk)} |
| 2814 | +& \tcode{bool} |
| 2815 | +& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br |
| 2816 | + \effects Equivalent to \tcode{b.find(k) != b.end()}% |
2776 | 2817 | & Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
|
2777 | 2818 | \\ \rowsep
|
2778 | 2819 | %
|
2779 | 2820 | \tcode{a_tran.contains(ke)}
|
2780 | 2821 | & \tcode{bool}
|
2781 |
| -& Equivalent to \tcode{a_tran.find(ke) != a_tran.end()}% |
| 2822 | +& \effects Equivalent to \tcode{a_tran.find(ke) != a_tran.end()}% |
| 2823 | +& Average case \bigoh{1}, |
| 2824 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2825 | +\\ \rowsep |
| 2826 | +% |
| 2827 | +\tcode{a_tran.contains(ke, hke)} |
| 2828 | +& \tcode{bool} |
| 2829 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2830 | + \effects Equivalent to \tcode{a_tran.find(ke, hke) != a_tran.end()}% |
2782 | 2831 | & Average case \bigoh{1},
|
2783 | 2832 | worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2784 | 2833 | \\ \rowsep
|
|
2794 | 2843 | \bigoh{\tcode{b.size()}}.
|
2795 | 2844 | \\ \rowsep
|
2796 | 2845 | %
|
| 2846 | +\tcode{b.equal_range(k, hk)} |
| 2847 | +& \tcode{pair<iterator, iterator>}; \br |
| 2848 | + \tcode{pair<const_iterator, const_iterator>} for const \tcode{b}. |
| 2849 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2850 | + \returns a range containing all elements with keys equivalent to |
| 2851 | + \tcode{k}. Returns \tcode{make_pair(b.end(), b.end())} if |
| 2852 | + no such elements exist.% |
| 2853 | +& Average case \bigoh{\tcode{b.count(k)}}. Worst case |
| 2854 | + \bigoh{\tcode{b.size()}}. |
| 2855 | +\\ \rowsep |
| 2856 | +% |
2797 | 2857 | \tcode{a_tran.equal_range(ke)}
|
2798 | 2858 | & \tcode{pair<iterator, iterator>}; \br
|
2799 | 2859 | \tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}.
|
|
2804 | 2864 | \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}. % avoid overfull
|
2805 | 2865 | Worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2806 | 2866 | \\ \rowsep
|
| 2867 | +% |
| 2868 | +\tcode{a_tran.equal_range(ke, hke)} |
| 2869 | +& \tcode{pair<iterator, iterator>}; \br |
| 2870 | + \tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}. |
| 2871 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2872 | + \returns a range containing all elements with keys equivalent to |
| 2873 | + \tcode{ke}. Returns \tcode{make_pair(a_tran.end(), a_tran.end())} if |
| 2874 | + no such elements exist.% |
| 2875 | +& Average case |
| 2876 | + \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}. % avoid overfull |
| 2877 | + Worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2878 | +\\ \rowsep |
2807 | 2879 | \indexunordmem{bucket_count}%
|
2808 | 2880 | \tcode{b.bucket_count()}
|
2809 | 2881 | & \tcode{size_type}
|
|
7939 | 8011 | // map operations
|
7940 | 8012 | iterator find(const key_type& k);
|
7941 | 8013 | const_iterator find(const key_type& k) const;
|
| 8014 | + iterator find(const key_type& k, size_t hash); |
| 8015 | + const_iterator find(const key_type& k, size_t hash) const; |
7942 | 8016 | template <class K>
|
7943 | 8017 | iterator find(const K& k);
|
7944 | 8018 | template <class K>
|
7945 | 8019 | const_iterator find(const K& k) const;
|
| 8020 | + template <class K> |
| 8021 | + iterator find(const K& k, size_t hash); |
| 8022 | + template <class K> |
| 8023 | + const_iterator find(const K& k, size_t hash) const; |
7946 | 8024 | size_type count(const key_type& k) const;
|
| 8025 | + size_type count(const key_type& k, size_t hash) const; |
7947 | 8026 | template <class K>
|
7948 | 8027 | size_type count(const K& k) const;
|
| 8028 | + template <class K> |
| 8029 | + size_type count(const K& k, size_t hash) const; |
7949 | 8030 | bool contains(const key_type& k) const;
|
| 8031 | + bool contains(const key_type& k, size_t hash) const; |
7950 | 8032 | template <class K>
|
7951 | 8033 | bool contains(const K& k) const;
|
| 8034 | + template <class K> |
| 8035 | + bool contains(const K& k, size_t hash) const; |
7952 | 8036 | pair<iterator, iterator> equal_range(const key_type& k);
|
7953 | 8037 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 8038 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 8039 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
7954 | 8040 | template <class K>
|
7955 | 8041 | pair<iterator, iterator> equal_range(const K& k);
|
7956 | 8042 | template <class K>
|
7957 | 8043 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 8044 | + template <class K> |
| 8045 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 8046 | + template <class K> |
| 8047 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
7958 | 8048 |
|
7959 | 8049 | // \ref{unord.map.elem}, element access
|
7960 | 8050 | mapped_type& operator[](const key_type& k);
|
|
8503 | 8593 | // map operations
|
8504 | 8594 | iterator find(const key_type& k);
|
8505 | 8595 | const_iterator find(const key_type& k) const;
|
| 8596 | + iterator find(const key_type& k, size_t hash); |
| 8597 | + const_iterator find(const key_type& k, size_t hash) const; |
8506 | 8598 | template <class K>
|
8507 | 8599 | iterator find(const K& k);
|
8508 | 8600 | template <class K>
|
8509 | 8601 | const_iterator find(const K& k) const;
|
| 8602 | + template <class K> |
| 8603 | + iterator find(const K& k, size_t hash); |
| 8604 | + template <class K> |
| 8605 | + const_iterator find(const K& k, size_t hash) const; |
8510 | 8606 | size_type count(const key_type& k) const;
|
| 8607 | + size_type count(const key_type& k, size_t hash) const; |
8511 | 8608 | template <class K>
|
8512 | 8609 | size_type count(const K& k) const;
|
| 8610 | + template <class K> |
| 8611 | + size_type count(const K& k, size_t hash) const; |
8513 | 8612 | bool contains(const key_type& k) const;
|
| 8613 | + bool contains(const key_type& k, size_t hash) const; |
8514 | 8614 | template <class K>
|
8515 | 8615 | bool contains(const K& k) const;
|
| 8616 | + template <class K> |
| 8617 | + bool contains(const K& k, size_t hash) const; |
8516 | 8618 | pair<iterator, iterator> equal_range(const key_type& k);
|
8517 | 8619 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 8620 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 8621 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
8518 | 8622 | template <class K>
|
8519 | 8623 | pair<iterator, iterator> equal_range(const K& k);
|
8520 | 8624 | template <class K>
|
8521 | 8625 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 8626 | + template <class K> |
| 8627 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 8628 | + template <class K> |
| 8629 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
8522 | 8630 |
|
8523 | 8631 | // bucket interface
|
8524 | 8632 | size_type bucket_count() const noexcept;
|
|
8865 | 8973 | // set operations
|
8866 | 8974 | iterator find(const key_type& k);
|
8867 | 8975 | const_iterator find(const key_type& k) const;
|
| 8976 | + iterator find(const key_type& k, size_t hash); |
| 8977 | + const_iterator find(const key_type& k, size_t hash) const; |
8868 | 8978 | template <class K>
|
8869 | 8979 | iterator find(const K& k);
|
8870 | 8980 | template <class K>
|
8871 | 8981 | const_iterator find(const K& k) const;
|
| 8982 | + template <class K> |
| 8983 | + iterator find(const K& k, size_t hash); |
| 8984 | + template <class K> |
| 8985 | + const_iterator find(const K& k, size_t hash) const; |
8872 | 8986 | size_type count(const key_type& k) const;
|
| 8987 | + size_type count(const key_type& k, size_t hash) const; |
8873 | 8988 | template <class K>
|
8874 | 8989 | size_type count(const K& k) const;
|
| 8990 | + template <class K> |
| 8991 | + size_type count(const K& k, size_t hash) const; |
8875 | 8992 | bool contains(const key_type& k) const;
|
| 8993 | + bool contains(const key_type& k, size_t hash) const; |
8876 | 8994 | template <class K>
|
8877 | 8995 | bool contains(const K& k) const;
|
| 8996 | + template <class K> |
| 8997 | + bool contains(const K& k, size_t hash) const; |
8878 | 8998 | pair<iterator, iterator> equal_range(const key_type& k);
|
8879 | 8999 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 9000 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 9001 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
8880 | 9002 | template <class K>
|
8881 | 9003 | pair<iterator, iterator> equal_range(const K& k);
|
8882 | 9004 | template <class K>
|
8883 | 9005 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 9006 | + template <class K> |
| 9007 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 9008 | + template <class K> |
| 9009 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
8884 | 9010 |
|
8885 | 9011 | // bucket interface
|
8886 | 9012 | size_type bucket_count() const noexcept;
|
|
9189 | 9315 | // set operations
|
9190 | 9316 | iterator find(const key_type& k);
|
9191 | 9317 | const_iterator find(const key_type& k) const;
|
| 9318 | + iterator find(const key_type& k, size_t hash); |
| 9319 | + const_iterator find(const key_type& k, size_t hash) const; |
9192 | 9320 | template <class K>
|
9193 | 9321 | iterator find(const K& k);
|
9194 | 9322 | template <class K>
|
9195 | 9323 | const_iterator find(const K& k) const;
|
| 9324 | + template <class K> |
| 9325 | + iterator find(const K& k, size_t hash); |
| 9326 | + template <class K> |
| 9327 | + const_iterator find(const K& k, size_t hash) const; |
9196 | 9328 | size_type count(const key_type& k) const;
|
| 9329 | + size_type count(const key_type& k, size_t hash) const; |
9197 | 9330 | template <class K>
|
9198 | 9331 | size_type count(const K& k) const;
|
| 9332 | + template <class K> |
| 9333 | + size_type count(const K& k, size_t hash) const; |
9199 | 9334 | bool contains(const key_type& k) const;
|
| 9335 | + bool contains(const key_type& k, size_t hash) const; |
9200 | 9336 | template <class K>
|
9201 | 9337 | bool contains(const K& k) const;
|
| 9338 | + template <class K> |
| 9339 | + bool contains(const K& k, size_t hash) const; |
9202 | 9340 | pair<iterator, iterator> equal_range(const key_type& k);
|
9203 | 9341 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 9342 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 9343 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
9204 | 9344 | template <class K>
|
9205 | 9345 | pair<iterator, iterator> equal_range(const K& k);
|
9206 | 9346 | template <class K>
|
9207 | 9347 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 9348 | + template <class K> |
| 9349 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 9350 | + template <class K> |
| 9351 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
9208 | 9352 |
|
9209 | 9353 | // bucket interface
|
9210 | 9354 | size_type bucket_count() const noexcept;
|
|
0 commit comments