|
2298 | 2298 | \end{itemize}
|
2299 | 2299 | where \tcode{r1} and \tcode{r2} are keys of elements in \tcode{a_tran},
|
2300 | 2300 | \item \tcode{n} denotes a value of type \tcode{size_type},
|
2301 |
| -\item \tcode{z} denotes a value of type \tcode{float}, and |
2302 |
| -\item \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}. |
| 2301 | +\item \tcode{z} denotes a value of type \tcode{float}, |
| 2302 | +\item \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}, and |
| 2303 | +\item \tcode{hk} and \tcode{hke} denote values of type \tcode{size_t}. |
2303 | 2304 | \end{itemize}
|
2304 | 2305 |
|
2305 | 2306 | % Local command to index names as members of all unordered containers.
|
|
2753 | 2754 | & Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
|
2754 | 2755 | \\ \rowsep
|
2755 | 2756 | %
|
| 2757 | +\tcode{b.find(k, hk)} |
| 2758 | +& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{b}. |
| 2759 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2760 | + \returns An iterator pointing to an element with key equivalent to |
| 2761 | + \tcode{k}, or \tcode{b.end()} if no such element exists. |
| 2762 | +& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}. |
| 2763 | +\\ \rowsep |
| 2764 | +% |
2756 | 2765 | \tcode{a_tran.find(ke)}
|
2757 | 2766 | & \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}.
|
2758 | 2767 | & \returns An iterator pointing to an element with key equivalent to
|
2759 | 2768 | \tcode{ke}, or \tcode{a_tran.end()} if no such element exists.
|
2760 | 2769 | & Average case \bigoh{1},
|
2761 |
| - worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid wverfull |
| 2770 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2771 | +\\ \rowsep |
| 2772 | +% |
| 2773 | +\tcode{a_tran.find(ke, hke)} |
| 2774 | +& \tcode{iterator}; \br \tcode{const_iterator} for const \tcode{a_tran}. |
| 2775 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2776 | + \returns An iterator pointing to an element with key equivalent to |
| 2777 | + \tcode{ke}, or \tcode{a_tran.end()} if no such element exists.% |
| 2778 | +& Average case \bigoh{1}, |
| 2779 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
2762 | 2780 | \\ \rowsep
|
2763 | 2781 | %
|
2764 | 2782 | \indexunordmem{count}%
|
|
2768 | 2786 | & Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}.
|
2769 | 2787 | \\ \rowsep
|
2770 | 2788 | %
|
| 2789 | +\tcode{b.count(k, hk)} |
| 2790 | +& \tcode{size_type} |
| 2791 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2792 | + \returns The number of elements with key equivalent to \tcode{k}.% |
| 2793 | +& Average case \bigoh{\tcode{b.count(k)}}, worst case \bigoh{\tcode{b.size()}}. |
| 2794 | +\\ \rowsep |
| 2795 | +% |
2771 | 2796 | \tcode{a_tran.count(ke)}
|
2772 | 2797 | & \tcode{size_type}
|
2773 | 2798 | & \returns The number of elements with key equivalent to \tcode{ke}.%
|
|
2776 | 2801 | worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2777 | 2802 | \\ \rowsep
|
2778 | 2803 | %
|
| 2804 | +\tcode{a_tran.count(ke, hke)} |
| 2805 | +& \tcode{size_type} |
| 2806 | +& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br |
| 2807 | + \returns The number of elements with key equivalent to \tcode{ke}.% |
| 2808 | +& Average case |
| 2809 | + \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}, % avoid overfull |
| 2810 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2811 | +\\ \rowsep |
| 2812 | +% |
2779 | 2813 | \indexunordmem{contains}%
|
2780 | 2814 | \tcode{b.contains(k)}
|
2781 | 2815 | & \tcode{bool}
|
2782 |
| -& Equivalent to \tcode{b.find(k) != b.end()}% |
| 2816 | +& \effects Equivalent to \tcode{b.find(k) != b.end()}% |
| 2817 | +& Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}. |
| 2818 | +\\ \rowsep |
| 2819 | +% |
| 2820 | +\tcode{b.contains(k, hk)} |
| 2821 | +& \tcode{bool} |
| 2822 | +& \expects \tcode{b.hash_function()(ke)} equals \tcode{hke}.\br |
| 2823 | + \effects Equivalent to \tcode{b.find(k) != b.end()}% |
2783 | 2824 | & Average case \bigoh{1}, worst case \bigoh{\tcode{b.size()}}.
|
2784 | 2825 | \\ \rowsep
|
2785 | 2826 | %
|
2786 | 2827 | \tcode{a_tran.contains(ke)}
|
2787 | 2828 | & \tcode{bool}
|
2788 |
| -& Equivalent to \tcode{a_tran.find(ke) != a_tran.end()}% |
| 2829 | +& \effects Equivalent to \tcode{a_tran.find(ke) != a_tran.end()}% |
| 2830 | +& Average case \bigoh{1}, |
| 2831 | + worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2832 | +\\ \rowsep |
| 2833 | +% |
| 2834 | +\tcode{a_tran.contains(ke, hke)} |
| 2835 | +& \tcode{bool} |
| 2836 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2837 | + \effects Equivalent to \tcode{a_tran.find(ke, hke) != a_tran.end()}% |
2789 | 2838 | & Average case \bigoh{1},
|
2790 | 2839 | worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2791 | 2840 | \\ \rowsep
|
|
2801 | 2850 | \bigoh{\tcode{b.size()}}.
|
2802 | 2851 | \\ \rowsep
|
2803 | 2852 | %
|
| 2853 | +\tcode{b.equal_range(k, hk)} |
| 2854 | +& \tcode{pair<iterator, iterator>}; \br |
| 2855 | + \tcode{pair<const_iterator, const_iterator>} for const \tcode{b}. |
| 2856 | +& \expects \tcode{b.hash_function()(k)} equals \tcode{hk}.\br |
| 2857 | + \returns A range containing all elements with keys equivalent to |
| 2858 | + \tcode{k}. Returns \tcode{make_pair(b.end(), b.end())} if |
| 2859 | + no such elements exist.% |
| 2860 | +& Average case \bigoh{\tcode{b.count(k)}}. Worst case |
| 2861 | + \bigoh{\tcode{b.size()}}. |
| 2862 | +\\ \rowsep |
| 2863 | +% |
2804 | 2864 | \tcode{a_tran.equal_range(ke)}
|
2805 | 2865 | & \tcode{pair<iterator, iterator>}; \br
|
2806 | 2866 | \tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}.
|
|
2811 | 2871 | \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}. % avoid overfull
|
2812 | 2872 | Worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull
|
2813 | 2873 | \\ \rowsep
|
| 2874 | +% |
| 2875 | +\tcode{a_tran.equal_range(ke, hke)} |
| 2876 | +& \tcode{pair<iterator, iterator>}; \br |
| 2877 | + \tcode{pair<const_iterator, const_iterator>} for const \tcode{a_tran}. |
| 2878 | +& \expects \tcode{a_tran.hash_function()(ke)} equals \tcode{hke}.\br |
| 2879 | + \returns A range containing all elements with keys equivalent to |
| 2880 | + \tcode{ke}. Returns \tcode{make_pair(a_tran.end(), a_tran.end())} if |
| 2881 | + no such elements exist.% |
| 2882 | +& Average case |
| 2883 | + \bigoh{\tcode{a_tran.}\br{}\tcode{count(ke)}}. % avoid overfull |
| 2884 | + Worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. % avoid overfull |
| 2885 | +\\ \rowsep |
2814 | 2886 | \indexunordmem{bucket_count}%
|
2815 | 2887 | \tcode{b.bucket_count()}
|
2816 | 2888 | & \tcode{size_type}
|
|
7964 | 8036 | // map operations
|
7965 | 8037 | iterator find(const key_type& k);
|
7966 | 8038 | const_iterator find(const key_type& k) const;
|
| 8039 | + iterator find(const key_type& k, size_t hash); |
| 8040 | + const_iterator find(const key_type& k, size_t hash) const; |
7967 | 8041 | template <class K>
|
7968 | 8042 | iterator find(const K& k);
|
7969 | 8043 | template <class K>
|
7970 | 8044 | const_iterator find(const K& k) const;
|
| 8045 | + template <class K> |
| 8046 | + iterator find(const K& k, size_t hash); |
| 8047 | + template <class K> |
| 8048 | + const_iterator find(const K& k, size_t hash) const; |
7971 | 8049 | size_type count(const key_type& k) const;
|
| 8050 | + size_type count(const key_type& k, size_t hash) const; |
7972 | 8051 | template <class K>
|
7973 | 8052 | size_type count(const K& k) const;
|
| 8053 | + template <class K> |
| 8054 | + size_type count(const K& k, size_t hash) const; |
7974 | 8055 | bool contains(const key_type& k) const;
|
| 8056 | + bool contains(const key_type& k, size_t hash) const; |
7975 | 8057 | template <class K>
|
7976 | 8058 | bool contains(const K& k) const;
|
| 8059 | + template <class K> |
| 8060 | + bool contains(const K& k, size_t hash) const; |
7977 | 8061 | pair<iterator, iterator> equal_range(const key_type& k);
|
7978 | 8062 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 8063 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 8064 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
7979 | 8065 | template <class K>
|
7980 | 8066 | pair<iterator, iterator> equal_range(const K& k);
|
7981 | 8067 | template <class K>
|
7982 | 8068 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 8069 | + template <class K> |
| 8070 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 8071 | + template <class K> |
| 8072 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
7983 | 8073 |
|
7984 | 8074 | // \ref{unord.map.elem}, element access
|
7985 | 8075 | mapped_type& operator[](const key_type& k);
|
|
8534 | 8624 | // map operations
|
8535 | 8625 | iterator find(const key_type& k);
|
8536 | 8626 | const_iterator find(const key_type& k) const;
|
| 8627 | + iterator find(const key_type& k, size_t hash); |
| 8628 | + const_iterator find(const key_type& k, size_t hash) const; |
8537 | 8629 | template <class K>
|
8538 | 8630 | iterator find(const K& k);
|
8539 | 8631 | template <class K>
|
8540 | 8632 | const_iterator find(const K& k) const;
|
| 8633 | + template <class K> |
| 8634 | + iterator find(const K& k, size_t hash); |
| 8635 | + template <class K> |
| 8636 | + const_iterator find(const K& k, size_t hash) const; |
8541 | 8637 | size_type count(const key_type& k) const;
|
| 8638 | + size_type count(const key_type& k, size_t hash) const; |
8542 | 8639 | template <class K>
|
8543 | 8640 | size_type count(const K& k) const;
|
| 8641 | + template <class K> |
| 8642 | + size_type count(const K& k, size_t hash) const; |
8544 | 8643 | bool contains(const key_type& k) const;
|
| 8644 | + bool contains(const key_type& k, size_t hash) const; |
8545 | 8645 | template <class K>
|
8546 | 8646 | bool contains(const K& k) const;
|
| 8647 | + template <class K> |
| 8648 | + bool contains(const K& k, size_t hash) const; |
8547 | 8649 | pair<iterator, iterator> equal_range(const key_type& k);
|
8548 | 8650 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 8651 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 8652 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
8549 | 8653 | template <class K>
|
8550 | 8654 | pair<iterator, iterator> equal_range(const K& k);
|
8551 | 8655 | template <class K>
|
8552 | 8656 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 8657 | + template <class K> |
| 8658 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 8659 | + template <class K> |
| 8660 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
8553 | 8661 |
|
8554 | 8662 | // bucket interface
|
8555 | 8663 | size_type bucket_count() const noexcept;
|
|
8896 | 9004 | // set operations
|
8897 | 9005 | iterator find(const key_type& k);
|
8898 | 9006 | const_iterator find(const key_type& k) const;
|
| 9007 | + iterator find(const key_type& k, size_t hash); |
| 9008 | + const_iterator find(const key_type& k, size_t hash) const; |
8899 | 9009 | template <class K>
|
8900 | 9010 | iterator find(const K& k);
|
8901 | 9011 | template <class K>
|
8902 | 9012 | const_iterator find(const K& k) const;
|
| 9013 | + template <class K> |
| 9014 | + iterator find(const K& k, size_t hash); |
| 9015 | + template <class K> |
| 9016 | + const_iterator find(const K& k, size_t hash) const; |
8903 | 9017 | size_type count(const key_type& k) const;
|
| 9018 | + size_type count(const key_type& k, size_t hash) const; |
8904 | 9019 | template <class K>
|
8905 | 9020 | size_type count(const K& k) const;
|
| 9021 | + template <class K> |
| 9022 | + size_type count(const K& k, size_t hash) const; |
8906 | 9023 | bool contains(const key_type& k) const;
|
| 9024 | + bool contains(const key_type& k, size_t hash) const; |
8907 | 9025 | template <class K>
|
8908 | 9026 | bool contains(const K& k) const;
|
| 9027 | + template <class K> |
| 9028 | + bool contains(const K& k, size_t hash) const; |
8909 | 9029 | pair<iterator, iterator> equal_range(const key_type& k);
|
8910 | 9030 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 9031 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 9032 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
8911 | 9033 | template <class K>
|
8912 | 9034 | pair<iterator, iterator> equal_range(const K& k);
|
8913 | 9035 | template <class K>
|
8914 | 9036 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 9037 | + template <class K> |
| 9038 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 9039 | + template <class K> |
| 9040 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
8915 | 9041 |
|
8916 | 9042 | // bucket interface
|
8917 | 9043 | size_type bucket_count() const noexcept;
|
|
9220 | 9346 | // set operations
|
9221 | 9347 | iterator find(const key_type& k);
|
9222 | 9348 | const_iterator find(const key_type& k) const;
|
| 9349 | + iterator find(const key_type& k, size_t hash); |
| 9350 | + const_iterator find(const key_type& k, size_t hash) const; |
9223 | 9351 | template <class K>
|
9224 | 9352 | iterator find(const K& k);
|
9225 | 9353 | template <class K>
|
9226 | 9354 | const_iterator find(const K& k) const;
|
| 9355 | + template <class K> |
| 9356 | + iterator find(const K& k, size_t hash); |
| 9357 | + template <class K> |
| 9358 | + const_iterator find(const K& k, size_t hash) const; |
9227 | 9359 | size_type count(const key_type& k) const;
|
| 9360 | + size_type count(const key_type& k, size_t hash) const; |
9228 | 9361 | template <class K>
|
9229 | 9362 | size_type count(const K& k) const;
|
| 9363 | + template <class K> |
| 9364 | + size_type count(const K& k, size_t hash) const; |
9230 | 9365 | bool contains(const key_type& k) const;
|
| 9366 | + bool contains(const key_type& k, size_t hash) const; |
9231 | 9367 | template <class K>
|
9232 | 9368 | bool contains(const K& k) const;
|
| 9369 | + template <class K> |
| 9370 | + bool contains(const K& k, size_t hash) const; |
9233 | 9371 | pair<iterator, iterator> equal_range(const key_type& k);
|
9234 | 9372 | pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 9373 | + pair<iterator, iterator> equal_range(const key_type& k, size_t hash); |
| 9374 | + pair<const_iterator, const_iterator> equal_range(const key_type& k, size_t hash) const; |
9235 | 9375 | template <class K>
|
9236 | 9376 | pair<iterator, iterator> equal_range(const K& k);
|
9237 | 9377 | template <class K>
|
9238 | 9378 | pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 9379 | + template <class K> |
| 9380 | + pair<iterator, iterator> equal_range(const K& k, size_t hash); |
| 9381 | + template <class K> |
| 9382 | + pair<const_iterator, const_iterator> equal_range(const K& k, size_t hash) const; |
9239 | 9383 |
|
9240 | 9384 | // bucket interface
|
9241 | 9385 | size_type bucket_count() const noexcept;
|
|
0 commit comments