-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbisect.po
178 lines (161 loc) · 8.42 KB
/
bisect.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# tomo, 2020
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
"PO-Revision-Date: 2020-05-30 11:57+0000\n"
"Last-Translator: tomo, 2020\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\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"
#: ../../library/bisect.rst:2
msgid ":mod:`bisect` --- Array bisection algorithm"
msgstr ":mod:`bisect` --- 配列二分法アルゴリズム"
#: ../../library/bisect.rst:10
msgid "**Source code:** :source:`Lib/bisect.py`"
msgstr "**ソースコード:** :source:`Lib/bisect.py`"
#: ../../library/bisect.rst:14
msgid ""
"This module provides support for maintaining a list in sorted order without "
"having to sort the list after each insertion. For long lists of items with "
"expensive comparison operations, this can be an improvement over the more "
"common approach. The module is called :mod:`bisect` because it uses a basic "
"bisection algorithm to do its work. The source code may be most useful as a "
"working example of the algorithm (the boundary conditions are already "
"right!)."
msgstr ""
"このモジュールは、挿入の度にリストをソートすることなく、リストをソートされた"
"順序に保つことをサポートします。大量の比較操作を伴うような、アイテムがたくさ"
"んあるリストでは、より一般的なアプローチに比べて、パフォーマンスが向上しま"
"す。動作に基本的な二分法アルゴリズムを使っているので、 :mod:`bisect` と呼ばれ"
"ています。ソースコードはこのアルゴリズムの実例として一番役に立つかもしれませ"
"ん (境界条件はすでに正しいです!)。"
#: ../../library/bisect.rst:21
msgid "The following functions are provided:"
msgstr "次の関数が用意されています:"
#: ../../library/bisect.rst:26
msgid ""
"Locate the insertion point for *x* in *a* to maintain sorted order. The "
"parameters *lo* and *hi* may be used to specify a subset of the list which "
"should be considered; by default the entire list is used. If *x* is already "
"present in *a*, the insertion point will be before (to the left of) any "
"existing entries. The return value is suitable for use as the first "
"parameter to ``list.insert()`` assuming that *a* is already sorted."
msgstr ""
"ソートされた順序を保ったまま *x* を *a* に挿入できる点を探し当てます。リスト"
"の中から検索する部分集合を指定するには、パラメータの *lo* と *hi* を使いま"
"す。デフォルトでは、リスト全体が使われます。*x* がすでに *a* に含まれている場"
"合、挿入点は既存のどのエントリーよりも前(左)になります。戻り値は、``list."
"insert()`` の第一引数として使うのに適しています。*a* はすでにソートされている"
"ものとします。"
#: ../../library/bisect.rst:33
msgid ""
"The returned insertion point *i* partitions the array *a* into two halves so "
"that ``all(val < x for val in a[lo:i])`` for the left side and ``all(val >= "
"x for val in a[i:hi])`` for the right side."
msgstr ""
"返された挿入点 *i* は、配列 *a* を二つに分け、``all(val < x for val in a[lo:"
"i])`` が左側に、``all(val >= x for val in a[i:hi])`` が右側になるようにしま"
"す。"
#: ../../library/bisect.rst:40
msgid ""
"Similar to :func:`bisect_left`, but returns an insertion point which comes "
"after (to the right of) any existing entries of *x* in *a*."
msgstr ""
":func:`bisect_left` と似ていますが、 *a* に含まれる *x* のうち、どのエント"
"リーよりも後ろ(右)にくるような挿入点を返します。"
#: ../../library/bisect.rst:43
msgid ""
"The returned insertion point *i* partitions the array *a* into two halves so "
"that ``all(val <= x for val in a[lo:i])`` for the left side and ``all(val > "
"x for val in a[i:hi])`` for the right side."
msgstr ""
"返された挿入点 *i* は、配列 *a* を二つに分け、``all(val <= x for val in a[lo:"
"i])`` が左側に、``all(val > x for val in a[i:hi])`` が右側になるようにしま"
"す。"
#: ../../library/bisect.rst:49
msgid ""
"Insert *x* in *a* in sorted order. This is equivalent to ``a.insert(bisect."
"bisect_left(a, x, lo, hi), x)`` assuming that *a* is already sorted. Keep "
"in mind that the O(log n) search is dominated by the slow O(n) insertion "
"step."
msgstr ""
"*x* を *a* にソート順で挿入します。これは、*a* がすでにソートされている場合、"
"``a.insert(bisect.bisect_left(a, x, lo, hi), x)`` と等価です。なお、O(log n) "
"の探索に対して、遅い O(n) の挿入の段階が律速となります。"
#: ../../library/bisect.rst:57
msgid ""
"Similar to :func:`insort_left`, but inserting *x* in *a* after any existing "
"entries of *x*."
msgstr ""
":func:`insort_left` と似ていますが、 *a* に含まれる *x* のうち、どのエント"
"リーよりも後ろに *x* を挿入します。"
#: ../../library/bisect.rst:62
msgid ""
"`SortedCollection recipe <https://code.activestate.com/recipes/577197-"
"sortedcollection/>`_ that uses bisect to build a full-featured collection "
"class with straight-forward search methods and support for a key-function. "
"The keys are precomputed to save unnecessary calls to the key function "
"during searches."
msgstr ""
"bisect を利用して、直接の探索ができ、キー関数をサポートする、完全な機能を持つ"
"コレクションクラスを組み立てる `SortedCollection recipe <https://code."
"activestate.com/recipes/577197-sortedcollection/>`_\\ 。キーは、探索中に不必"
"要な呼び出しをさせないために、予め計算しておきます。"
#: ../../library/bisect.rst:70
msgid "Searching Sorted Lists"
msgstr "ソート済みリストの探索"
#: ../../library/bisect.rst:72
msgid ""
"The above :func:`bisect` functions are useful for finding insertion points "
"but can be tricky or awkward to use for common searching tasks. The "
"following five functions show how to transform them into the standard "
"lookups for sorted lists::"
msgstr ""
"上記の :func:`bisect` 関数群は挿入点を探索するのには便利ですが、普通の探索タ"
"スクに使うのはトリッキーだったり不器用だったりします。以下の 5 関数は、これら"
"をどのように標準の探索やソート済みリストに変換するかを説明します::"
#: ../../library/bisect.rst:114
msgid "Other Examples"
msgstr "その他の使用例"
#: ../../library/bisect.rst:118
msgid ""
"The :func:`bisect` function can be useful for numeric table lookups. This "
"example uses :func:`bisect` to look up a letter grade for an exam score "
"(say) based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 "
"to 89 is a 'B', and so on::"
msgstr ""
":func:`bisect` 関数は数値テーブルの探索に役に立ちます。この例では、 :func:"
"`bisect` を使って、(たとえば)順序のついた数値の区切り点の集合に基づいて、試験"
"の成績の等級を表す文字を調べます。区切り点は 90 以上は 'A'、 80 から 89 は "
"'B'、などです::"
#: ../../library/bisect.rst:130
msgid ""
"Unlike the :func:`sorted` function, it does not make sense for the :func:"
"`bisect` functions to have *key* or *reversed* arguments because that would "
"lead to an inefficient design (successive calls to bisect functions would "
"not \"remember\" all of the previous key lookups)."
msgstr ""
":func:`sorted` 関数と違い、 :func:`bisect` 関数に *key* や *reversed* 引数を"
"用意するのは、設計が非効率になるので、非合理的です (連続する bisect 関数の呼"
"び出しは前回の key 参照の結果を \"記憶\" しません)。"
#: ../../library/bisect.rst:135
msgid ""
"Instead, it is better to search a list of precomputed keys to find the index "
"of the record in question::"
msgstr ""
"代わりに、事前に計算しておいたキーのリストから検索して、レコードのインデック"
"スを見つけます::"