msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Unordered "
"Translation (zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-07 09:29+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-unordered-documentation-"
"zh_Hans/doc-modules-root-pages-regular-adoc/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#: :1
#, safe-html, strict-same
msgid "﻿[#regular] = Regular Containers"
msgstr "[#regular] = 常规容器"

#: :4
#, safe-html, strict-same
msgid ":idprefix: regular_"
msgstr ":idprefix: regular_"

#: :6
#, safe-html, strict-same
msgid ""
"Boost.Unordered closed-addressing containers (`boost::unordered_set`, "
"`boost::unordered_map`, `boost::unordered_multiset` and "
"`boost::unordered_multimap`) are fully conformant with the C++ specification "
"for unordered associative containers, so for those who know how to use "
"`std::unordered_set`, `std::unordered_map`, etc., their homonyms in "
"Boost.Unordered are drop-in replacements. The interface of open-addressing "
"containers (`boost::unordered_node_set`, `boost::unordered_node_map`, "
"`boost::unordered_flat_set` and `boost::unordered_flat_map`) is very "
"similar, but they present some minor differences listed in the dedicated "
"xref:compliance.adoc#compliance_open_addressing_containers[standard "
"compliance section]."
msgstr ""
"Boost.Unordered 的闭寻址容器（ `boost::unordered++_++set` 、 "
"`boost::unordered++_++map` 、 `boost::unordered++_++multiset` 与 "
"`boost::unordered++_++multimap` ）完全符合 C{plus}{plus} 无序关联容器的标准规"
"范。因此，对于熟悉 `std::unordered++_++set` 、 `std::unordered++_++map` 等用"
"法的用户，可直接将其替换为Boost.Unordered 中的同名容器。开放寻址容器（ "
"`boost::unordered++_++node++_++set` 、 `boost::unordered++_++node++_++map` "
"、 `boost::unordered++_++flat++_++set` 和 "
"`boost::unordered++_++flat++_++map` ）的接口与之高度相似，但存在一些细微差异"
"，详见专门的 xref:compliance.adoc#compliance_open_addressing_containers[标准"
"符合性章节] 。"

#: :16
#, safe-html, strict-same
msgid ""
"For readers without previous experience with hash containers but familiar "
"with normal associative containers (`std::set`, `std::map`, `std::multiset` "
"and `std::multimap`), Boost.Unordered containers are used in a similar "
"manner:"
msgstr ""
"对于没有哈希容器经验但熟悉常规关联容器（ `std::set` 、 `std::map` 、 "
"`std::multiset` 和 `std::multimap` ）的读者，Boost.Unordered 容器的使用方式与"
"之类似："

#: :32
#, safe-html, strict-same
msgid "But since the elements aren't ordered, the output of:"
msgstr "但由于元素不按顺序存储，以下代码的输出结果："

#: :41
#, safe-html, strict-same
msgid "can be in any order. For example, it might be:"
msgstr "可能以任意顺序输出。例如，结果可能为："

#: :50
#, safe-html, strict-same
msgid ""
"There are other differences, which are listed in the "
"xref:regular.adoc#comparison[Comparison with Associative Containers] section."
msgstr "其他差异列于 xref:regular.adoc#comparison[与关联容器的对比] 章节中。"

#: :53
#, safe-html, strict-same
msgid "Iterator Invalidation"
msgstr "迭代器失效"

#: :55
#, safe-html, strict-same
msgid ""
"It is not specified how member functions other than `rehash` and `reserve` "
"affect the bucket count, although `insert` can only invalidate iterators "
"when the insertion causes the container's load to be greater than the "
"maximum allowed. For most implementations this means that `insert` will only "
"change the number of buckets when this happens. Iterators can be invalidated "
"by calls to `insert`, `rehash` and `reserve`."
msgstr ""
"标准未明确规定除 `rehash` 和 `reserve` 之外的成员函数如何影响桶数量，但 "
"`insert` 操作仅当导致容器负载超过最大允许值时才会使迭代器失效。在大多数实现中"
"，这意味着 `insert` 仅在此种情况下才会改变桶的数量。迭代器可能因调用 "
"`insert` 、 `rehash` 或 `reserve` 而失效。"

#: :62
#, safe-html, strict-same
msgid ""
"As for pointers and references, they are never invalidated for node-based "
"containers (`boost::unordered_[multi]set`, `boost::unordered_[multi]map`, "
"`boost::unordered_node_set`, `boost::unordered_node_map`), but they will be "
"when rehashing occurs for `boost::unordered_flat_set` and "
"`boost::unordered_flat_map`: this is because these containers store elements "
"directly into their holding buckets, so when allocating a new bucket array "
"the elements must be transferred by means of move construction."
msgstr ""
"对于基于节点的容器（ `boost::unordered++_[++multi++]++set` 、 "
"`boost::unordered++_[++multi++]++map` 、 `boost::unordered++_++node++_++set` "
"、 `boost::unordered++_++node++_++map` ），其指针和引用永远不会失效。但对于 "
"`boost::unordered++_++flat++_++set` 和 `boost::unordered++_++flat++_++map` ，"
"在发生重哈希时指针和引用将会失效：这是因为这些容器将元素直接存储在桶中，当分"
"配新的桶数组时，必须通过移动构造来转移元素。"

#: :70
#, safe-html, strict-same
msgid ""
"In a similar manner to using `reserve` for ``vector``s, it can be a good "
"idea to call `reserve` before inserting a large number of elements. This "
"will get the expensive rehashing out of the way and let you store iterators, "
"safe in the knowledge that they won't be invalidated. If you are inserting "
"`n` elements into container `x`, you could first call:"
msgstr ""
"与为 `vector` 使用 `reserve` 类似，在插入大量元素之前调用 `reserve` 是一个好"
"主意。这样可以避免代价高昂的重哈希操作，并且让你能够存储迭代器，确信它们不会"
"被失效。如果你要向容器 `x` 插入 `n` 个元素，可以先调用："

#: :76
#, safe-html, strict-same
msgid "``` x.reserve(n); ```"
msgstr "``` x.reserve(n); ```"

#: :80
#, safe-html, strict-same
msgid ""
"`reserve(n)` reserves space for at least `n` elements, allocating enough "
"buckets"
msgstr "`reserve(n)` 为至少 `n` 个元素预留空间，分配足够数量的桶，"

#: :81
#, safe-html, strict-same
msgid ""
"so as to not exceed the maximum load factor. + Because the maximum load "
"factor is defined as the number of elements divided by the total number of "
"available buckets, this function is logically equivalent to: + ``` x.rehash"
"(std::ceil(n / x.max_load_factor())) ``` + See the xref:reference/"
"unordered_map.adoc#unordered_map_rehash[reference for more details] on the "
"`rehash` function."
msgstr ""
"以确保不超过最大负载因子。由于最大负载因子定义为元素数量除以可用桶的总数，该"
"函数在逻辑上等价于：\n"
"```cppx.rehash(std::ceil(n / x.max_load_factor()))```\n"
"有关 `rehash` 函数的更多详细信息，请参阅 xref:reference/"
"unordered_map.adoc#unordered_map_rehash[参考文档]。"

#: :94
#, safe-html, strict-same
msgid ":idprefix: comparison_"
msgstr ":idprefix: comparison_"

#: :96
#, safe-html, strict-same
msgid "Comparison with Associative Containers"
msgstr "与关联容器的对比"

#: :100
#, safe-html, strict-same
msgctxt ":100"
msgid "Associative Containers"
msgstr "关联容器"

#: :100
#, safe-html, strict-same
msgctxt ":100"
msgid "Unordered Associative Containers"
msgstr "无序关联容器"

#: :100
#, safe-html, strict-same
msgid "Parameterized by an ordering relation `Compare`"
msgstr "通过排序关系 `Compare` 进行 参数化"

#: :100
#, safe-html, strict-same
msgid ""
"Parameterized by a function object `Hash` and an equivalence relation `Pred`"
msgstr "由函数对象`哈希对象`和等价关系`谓词对象`参数化。"

#: :100
#, safe-html, strict-same
msgid ""
"Keys can be compared using `key_compare` which is accessed by member "
"function `key_comp()`, values can be compared using `value_compare` which is "
"accessed by member function `value_comp()`."
msgstr ""
"键可通过成员函数`key_comp()`获取的`键比较对象`进行比较，值可通过成员函"
"数`value_comp()`获取的`值比较对象`进行比较。"

#: :100
#, safe-html, strict-same
msgid ""
"Keys can be hashed using `hasher` which is accessed by member function "
"`hash_function()`, and checked for equality using `key_equal` which is "
"accessed by member function `key_eq()`. There is no function object for "
"compared or hashing values."
msgstr ""
"键可通过成员函数`hash_function()`获取的`哈希对象`进行哈希计算，并通过成员函"
"数`key_eq()`获取的`键相等比较对象`检查是否相等。不存在用于值比较或值哈希的函"
"数对象。"

#: :100
#, safe-html, strict-same
msgid "Constructors have optional extra parameters for the comparison object."
msgstr "构造函数包含用于比较对象的可选额外参数。"

#: :100
#, safe-html, strict-same
msgid ""
"Constructors have optional extra parameters for the initial minimum number "
"of buckets, a hash function and an equality object."
msgstr ""
"构造函数包含可选的额外参数，用于指定初始最小哈希桶数量、哈希函数以及相等性判"
"断对象。"

#: :100
#, safe-html, strict-same
msgid ""
"Keys `k1`, `k2` are considered equivalent if `!Compare(k1, k2) && !Compare"
"(k2, k1)`."
msgstr "若`!对象(k1, k2) &amp;&amp; !对象(k2, k1)`，则键`k1`、`k2`视为等价。"

#: :100
#, safe-html, strict-same
msgid "Keys `k1`, `k2` are considered equivalent if `Pred(k1, k2)`"
msgstr "若`谓词对象(k1, k2)成立`，则键`k1`、`k2`视为等价。"

#: :100
#, safe-html, strict-same
msgid "Member function `lower_bound(k)` and `upper_bound(k)`"
msgstr "成员函数`lower_bound(k)`和`upper_bound(k)`"

#: :100
#, safe-html, strict-same
msgid ""
"No equivalent. Since the elements aren't ordered `lower_bound` and "
"`upper_bound` would be meaningless."
msgstr "无对应接口。由于元素无序，`lower_bound `和 `upper_bound `无实际意义。"

#: :100
#, safe-html, strict-same
msgid ""
"`equal_range(k)` returns an empty range at the position that `k` would be "
"inserted if `k` isn't present in the container."
msgstr "若键k不存在于容器中，equal_range(k)会在k 应插入的位置返回一个空区间。"

#: :100
#, safe-html, strict-same
msgid ""
"`equal_range(k)` returns a range at the end of the container if `k` isn't "
"present in the container. It can't return a positioned range as `k` could be "
"inserted into multiple place. +"
msgstr ""
"equal_range(k) 若键k不存在于容器中，则返回容器末尾的区间。该函数无法返回定位"
"区间，因为k可被插入到多个位置。"

#: :120
#, safe-html, strict-same
msgid ""
"**Closed-addressing containers:** To find out the bucket that `k` would be "
"inserted into use `bucket(k)`. But remember that an insert can cause the "
"container to rehash - meaning that the element can be inserted into a "
"different bucket."
msgstr ""
"闭散列容器：使用 bucket (k) 可确定键 k 待插入的哈希桶。需注意，插入操作可能触"
"发容器重新哈希，元素最终会被存入其他哈希桶。"

#: :122
#, safe-html, strict-same
msgid "`iterator`, `const_iterator` are of the bidirectional category."
msgstr "`迭代器`、`常迭代器`的迭代类别为双向迭代器。"

#: :122
#, safe-html, strict-same
msgid "`iterator`, `const_iterator` are of at least the forward category."
msgstr "`迭代器`、`常迭代器`的迭代类别至少为前向迭代器。"

#: :122
#, safe-html, strict-same
msgid ""
"Iterators, pointers and references to the container's elements are never "
"invalidated."
msgstr "指向容器元素的迭代器、指针和引用永远不会失效。"

#: :122
#, safe-html, strict-same
msgid ""
"xref:regular.adoc#regular_iterator_invalidation[Iterators can be invalidated "
"by calls to insert or rehash]. +"
msgstr ""
"xref:regular.adoc#regular_iterator_invalidation [调用 insert 或 rehash 可能会"
"导致迭代器失效]。"

#: :127
#, safe-html, strict-same
msgid ""
"**Node-based containers:** Pointers and references to the container's "
"elements are never invalidated. + **Flat containers:** Pointers and "
"references to the container's elements are invalidated when rehashing occurs."
msgstr ""
"基于节点的容器：指向容器元素的指针和引用永远不会失效。\n"
"扁平容器：发生重新哈希时，指向容器元素的指针和引用将会失效。"

#: :130
#, safe-html, strict-same
msgid ""
"Iterators iterate through the container in the order defined by the "
"comparison object."
msgstr "迭代器按照比较对象定义的顺序遍历容器。"

#: :130
#, safe-html, strict-same
msgid ""
"Iterators iterate through the container in an arbitrary order, that can "
"change as elements are inserted, although equivalent elements are always "
"adjacent."
msgstr ""
"迭代器以任意顺序遍历容器，该顺序会随元素插入发生变化，但等价元素始终保持相邻"
"。"

#: :130
#, safe-html, strict-same
msgid "No equivalent"
msgstr "无对应接口"

#: :130
#, safe-html, strict-same
msgid ""
"**Closed-addressing containers:** Local iterators can be used to iterate "
"through individual buckets. (The order of local iterators and iterators "
"aren't required to have any correspondence.)"
msgstr ""
"闭散列容器：本地迭代器可用于遍历各个哈希桶。（本地迭代器与迭代器的顺序无需存"
"在对应关系。）"

#: :130
#, safe-html, strict-same
msgid "Can be compared using the `==`, `!=`, `<`, `\\<=`, `>`, `>=` operators."
msgstr "可使用`==`, `!=`, `&lt;`, `\\&lt;=`, `&gt;`, `&gt;=`运算符进行比较。"

#: :130
#, safe-html, strict-same
msgid "Can be compared using the `==` and `!=` operators."
msgstr "可使用`==` 和`!=`运算符进行比较。"

#: :130
#, safe-html, strict-same
msgid ""
"When inserting with a hint, implementations are permitted to ignore the hint."
msgstr "使用提示迭代器插入元素时，实现允许忽略该提示。"

#: :144
#, safe-html, strict-same
msgid "---"
msgstr "---"

#: :148
#, safe-html, strict-same
msgid "Operation"
msgstr "操作"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "Associative Containers"
msgstr "关联容器"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "Unordered Associative Containers"
msgstr "无序关联容器"

#: :148
#, safe-html, strict-same
msgid "Construction of empty container"
msgstr "空容器的构造"

#: :148
#, safe-html, strict-same
msgid "constant"
msgstr "常数级"

#: :148
#, safe-html, strict-same
msgid "O(_n_) where _n_ is the minimum number of buckets."
msgstr "O(_n_)，其中 _n_ 是最小桶数。"

#: :148
#, safe-html, strict-same
msgid "Construction of container from a range of _N_ elements"
msgstr "由_N_元素的区间构造容器"

#: :148
#, safe-html, strict-same
msgid "O(_N log N_), O(_N_) if the range is sorted with `value_comp()`"
msgstr "O(_N log N_)，如果区间已按 `value_comp()` 排序则为 O(_N_)"

#: :148
#, safe-html, strict-same
msgid "Average case O(_N_), worst case O(_N^2^_)"
msgstr "平均时间复杂度  O(_N_)，最坏时间复杂度 O(_N^2^_)"

#: :148
#, safe-html, strict-same
msgid "Insert a single element"
msgstr "插入单个元素"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "logarithmic"
msgstr "对数级"

#: :148
#, safe-html, strict-same
msgid "Average case constant, worst case linear"
msgstr "平均情况为常数时间，最坏情况为线性时间"

#: :148
#, safe-html, strict-same
msgid "Insert a single element with a hint"
msgstr "带提示插入单个元素"

#: :148
#, safe-html, strict-same
msgid ""
"Amortized constant if `t` elements inserted right after hint, logarithmic "
"otherwise"
msgstr "若在提示位置后直接插入t个元素，则为均摊常数时间；否则为对数时间"

#: :148
#, safe-html, strict-same
msgid ""
"Average case constant, worst case linear (ie. the same as a normal insert)."
msgstr "平均情况为常数时间，最坏情况为线性时间（即与普通插入操作一致）。"

#: :148
#, safe-html, strict-same
msgid "Inserting a range of _N_ elements"
msgstr "插入_N_元素的区间"

#: :148
#, safe-html, strict-same
msgid "_N_ log(`size()` + _N_)"
msgstr "_N_ log(`size()` + _N_)"

#: :148
#, safe-html, strict-same
msgid "Average case O(_N_), worst case O(_N_ * `size()`)"
msgstr "平均时间复杂度 O(_N_)，最坏时间复杂度O (_N_ * `size()`)"

#: :148
#, safe-html, strict-same
msgid "Erase by key, `k`"
msgstr "按键`k`移除"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "O(log(`size()`) + `count(k)`)"
msgstr "O(log(`size()`) + `count(k)`)"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "Average case: O(`count(k)`), Worst case: O(`size()`)"
msgstr "平均情况：O(`count(k)`)，最坏情况：O(`size()`)"

#: :148
#, safe-html, strict-same
msgid "Erase a single element by iterator"
msgstr "通过迭代器移除单个元素"

#: :148
#, safe-html, strict-same
msgid "Amortized constant"
msgstr "均摊常数时间"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "Average case: O(1), Worst case: O(`size()`)"
msgstr "平均情况：O (1)，最坏情况：O(`size()`)"

#: :148
#, safe-html, strict-same
msgid "Erase a range of _N_ elements"
msgstr "移除 _N_元素的区间"

#: :148
#, safe-html, strict-same
msgid "O(log(`size()`) + _N_)"
msgstr "O(log(`size()`) + _N_)"

#: :148
#, safe-html, strict-same
msgid "Average case: O(_N_), Worst case: O(`size()`)"
msgstr "平均情况：O(_N_)，最坏情况： O(`size()`)"

#: :148
#, safe-html, strict-same
msgid "Clearing the container"
msgstr "清空容器"

#: :148
#, safe-html, strict-same
msgctxt ":148"
msgid "O(`size()`)"
msgstr "O(`size()`)"

#: :148
#, safe-html, strict-same
msgid "Find"
msgstr "查找"

#: :148
#, safe-html, strict-same
msgid "Count"
msgstr "计数"

#: :148
#, safe-html, strict-same
msgid "`equal_range(k)`"
msgstr "`equal_range(k)`"

#: :148
#, safe-html, strict-same
msgid "`lower_bound`,`upper_bound`"
msgstr "`lower_bound`,`upper_bound`"

#: :148
#, safe-html, strict-same
msgid "n/a"
msgstr "n/a"
