Python 3.6.5 ドキュメント 検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 16 for heapq (0.111 sec.)
8.5. heapq --- ヒープキューアルゴリズム — Python 3.6.5 ドキュメント 15266
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... リ » 8. データ型 » 8.5. heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/h ... ったリストを変換します。 次の関数が用意されています: heapq. heappush ( heap , item ) ¶ item を heap に push し ... ます。ヒープ不変式を保ちます。 heapq. heappop ( heap ) ¶ pop を行い、 heap から最小の要 ... 要素にアクセスするには、 heap[0] を使ってください。 heapq. heappushpop ( heap , item ) ¶ item を heap に pus ...
https://man.plustar.jp/python/library/heapq.html - [similar]
What's New in Python 2.3 — Python 3.6.5 ドキュメント 8785
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... を超えるファイルを扱えるようになっています。 The new heapq module contains an implementation of a heap queue ... ormation about the priority queue data structure.) heapq モジュールには、 heappush() 関数と heappop() 関数が ... リストを使う例としてはこのような具合です: >>> import heapq >>> heap = [] >>> for item in [ 3 , 7 , 5 , 11 , 1 ... ]: ... heapq . heappush ( heap , item ) ... >>> heap [1, 3, 5, ...
https://man.plustar.jp/python/whatsnew/2.3.html - [similar]
What's New In Python 3.5 — Python 3.6.5 ドキュメント 8785
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... ました。 (Contributed by Tim Heaney in bpo-19222 .) heapq ¶ Element comparison in merge() can now be customi ... be used to reverse element comparison: >>> import heapq >>> a = [ '9' , '777' , '55555' ] >>> b = [ '88' , ... '6666' ] >>> list ( heapq . merge ( a , b , key = len )) ['9', '88', '777', ... '6666', '55555'] >>> list ( heapq . merge ( reversed ( a ), reversed ( b ), key = le ...
https://man.plustar.jp/python/whatsnew/3.5.html - [similar]
10.2. functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.6.5 ド... 8439
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... 関数を受け取るツール ( sorted() , min() , max() , heapq.nlargest() , heapq.nsmallest() , itertools.groupby ...
https://man.plustar.jp/python/library/functools.html - [similar]
11. 標準ライブラリミニツアー --- その 2 — Python 3.6.5 ドキュメント 8439
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python チュートリア ... l'), (300, 'ruby'), (400, 'lua'), (500, 'python')] heapq モジュールは、通常のリストでヒープを実装するための ... クセスするようなアプリケーションで便利です: >>> from heapq import heapify , heappop , heappush >>> data = [ 1 ...
https://man.plustar.jp/python/tutorial/stdlib2.html - [similar]
用語集 — Python 3.6.5 ドキュメント 8248
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » 用語集 ¶ >>> インタ ... 理します。 min() , max() , sorted() , list.sort() , heapq.merge() , heapq.nsmallest() , heapq.nlargest() , i ...
https://man.plustar.jp/python/glossary.html - [similar]
8.6. bisect --- 配列二分法アルゴリズム — Python 3.6.5 ドキュメント 8248
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ストの探索 8.6.2. その他の使用例 前のトピックへ 8.5. heapq --- ヒープキューアルゴリズム 次のトピックへ 8.7. a ...
https://man.plustar.jp/python/library/bisect.html - [similar]
8. データ型 — Python 3.6.5 ドキュメント 8248
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... 象基底クラス 8.4.1. コレクション抽象基底クラス 8.5. heapq --- ヒープキューアルゴリズム 8.5.1. 基本的な例 8.5 ...
https://man.plustar.jp/python/library/datatypes.html - [similar]
What's New in Python 2.5 — Python 3.6.5 ドキュメント 8248
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... 定する 0、1、2 です。 (Contributed by Barry Warsaw.) heapq モジュールの nsmallest() 関数と nlargest() 関数がキ ... 提供されているものと似たものです。例えば: >>> import heapq >>> L = [ "short" , 'medium' , 'longest' , 'longer ... still' ] >>> heapq . nsmallest ( 2 , L ) # Return two lowest elements ... lexicographically ['longer still', 'longest'] >>> heapq . nsmallest ( 2 , L , key = len ) # Return two sho ...
https://man.plustar.jp/python/whatsnew/2.5.html - [similar]
What's New in Python 2.6 — Python 3.6.5 ドキュメント 8248
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... ファイル名を返すようになりました。 ( bpo-1001604 ) heapq モジュールの新しい関数 merge(iter1, iter2, ...) は ... こはきちんと書かれています。---)。例えば: >>> list ( heapq . merge ([ 1 , 3 , 5 , 9 ], [ 2 , 8 , 16 ])) [1, 2 ... appop() を別々に呼び出すよりも効率的に実行します。 heapq は以前使っていた「以下( <= )」比較ではなく「より小 ... < )」比較だけを使って実装されています。これにより heapq に格納する型の要件が list.sort() メソッドに合致しま ...
https://man.plustar.jp/python/whatsnew/2.6.html - [similar]
PREV 1 2 NEXT