Results of 1 - 10 of about 50 for heapq (0.015 sec.)
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 13129
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/heapq
...exist. The root, maxheap[0] , contains the largest element; heap.sort(reverse=True) maintains the max-heap invariant. The heapq API differs from textbook heap algorithms in two aspects: (a) We use zero-based indexing. This makes the relationship betw...max-heap using the heapify() or heapify_max() functions, respectively. The following functions are provided for min-heaps: heapq. heapify ( x ) ¶ Transform list x into a min-heap, in-place, in linear time. heapq. heappush ( heap , item ) ¶ Push the va...lue item onto the heap , maintaining the min-heap invariant. heapq. heappop ( heap ) ¶ Pop and return the smallest item from the heap , maintaining the min-heap invariant. If the heap is em... - https://man.mtool.work/python/3.14/library/heapq.html
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 13129
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/heapq
...exist. The root, maxheap[0] , contains the largest element; heap.sort(reverse=True) maintains the max-heap invariant. The heapq API differs from textbook heap algorithms in two aspects: (a) We use zero-based indexing. This makes the relationship betw...max-heap using the heapify() or heapify_max() functions, respectively. The following functions are provided for min-heaps: heapq. heapify ( x ) ¶ Transform list x into a min-heap, in-place, in linear time. heapq. heappush ( heap , item ) ¶ Push the va...lue item onto the heap , maintaining the min-heap invariant. heapq. heappop ( heap ) ¶ Pop and return the smallest item from the heap , maintaining the min-heap invariant. If the heap is em... - https://man.mtool.work/python/3.14/library/heapq.html
- 索引 — Python 3.14.8 ドキュメント 11685
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – H halfdelay() (curses モジュール) Handle (asyncio のクラス) handle() (http.server.BaseHTTPRequestHandler のメソッド) (logging.Handler
...c.client.ProtocolError の属性) HeaderWriteError heading() (tkinter.ttk.Treeview のメソッド) (turtle モジュール) heapify() (heapq モジュール) heapify_max() (heapq モジュール) heapmin() (msvcrt モジュール) heappop() (heapq モジュール) heappop_max() (hea...pq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq...module heapreplace() (heapq モジュール) heapreplace_max() (heapq モジュール) height (tkinter.Event の属性) height() (tkinter.Image のメソッド) helo()... - https://man.mtool.work/python/3.14/genindex-H.html
- 索引 — Python 3.14.8 ドキュメント 11685
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – H halfdelay() (curses モジュール) Handle (asyncio のクラス) handle() (http.server.BaseHTTPRequestHandler のメソッド) (logging.Handler
...c.client.ProtocolError の属性) HeaderWriteError heading() (tkinter.ttk.Treeview のメソッド) (turtle モジュール) heapify() (heapq モジュール) heapify_max() (heapq モジュール) heapmin() (msvcrt モジュール) heappop() (heapq モジュール) heappop_max() (hea...pq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq...module heapreplace() (heapq モジュール) heapreplace_max() (heapq モジュール) height (tkinter.Event の属性) height() (tkinter.Image のメソッド) helo()... - https://man.mtool.work/python/3.14/genindex-H.html
- ソートのテクニック — Python 3.14.8 ドキュメント 8602
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » ソートのテクニック テーマ 自動 ライト ダーク | ソートのテクニック ¶ Author : Andrew Dalke and Raymond Hettinger Python のリストにはリストをインプレ
...'B' , 4 : 'E' , 5 : 'A' }) [1, 2, 3, 4, 5] Key 関数 ¶ The list.sort() method and the functions sorted() , min() , max() , heapq.nsmallest() , and heapq.nlargest() have a key parameter to specify a function (or other callable) to be called on each lis...max() はそれぞれ最小値と最大値を返します。これらの関数は入力データを一度だけ通過し、補助的なメモリをほとんど要求しません。 heapq.nsmallest() と heapq.nlargest() はそれぞれ最小と最大の値 n 個を返します。これらの関数はデータを一度だけ通過し、一度に n 要...素だけを記憶します。入力の数に対して小さい n の値では、これらの関数は完全なソートより比較の回数がはるかに少なくなります。 heapq.heappush() と heapq.heappop() は最小の要素がつねに位置 0 になる、部分的にソートされたデータの配列を作り維持します。これらの... - https://man.mtool.work/python/3.14/howto/sorting.html
- ソートのテクニック — Python 3.14.8 ドキュメント 8602
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » ソートのテクニック テーマ 自動 ライト ダーク | ソートのテクニック ¶ Author : Andrew Dalke and Raymond Hettinger Python のリストにはリストをインプレ
...'B' , 4 : 'E' , 5 : 'A' }) [1, 2, 3, 4, 5] Key 関数 ¶ The list.sort() method and the functions sorted() , min() , max() , heapq.nsmallest() , and heapq.nlargest() have a key parameter to specify a function (or other callable) to be called on each lis...max() はそれぞれ最小値と最大値を返します。これらの関数は入力データを一度だけ通過し、補助的なメモリをほとんど要求しません。 heapq.nsmallest() と heapq.nlargest() はそれぞれ最小と最大の値 n 個を返します。これらの関数はデータを一度だけ通過し、一度に n 要...素だけを記憶します。入力の数に対して小さい n の値では、これらの関数は完全なソートより比較の回数がはるかに少なくなります。 heapq.heappush() と heapq.heappop() は最小の要素がつねに位置 0 になる、部分的にソートされたデータの配列を作り維持します。これらの... - https://man.mtool.work/python/3.14/howto/sorting.html
- 索引 — Python 3.14.8 ドキュメント 7459
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | 索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | イ | エ | オ | カ | キ
...c.client.ProtocolError の属性) HeaderWriteError heading() (tkinter.ttk.Treeview のメソッド) (turtle モジュール) heapify() (heapq モジュール) heapify_max() (heapq モジュール) heapmin() (msvcrt モジュール) heappop() (heapq モジュール) heappop_max() (hea...pq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq...module heapreplace() (heapq モジュール) heapreplace_max() (heapq モジュール) height (tkinter.Event の属性) height() (tkinter.Image のメソッド) helo()... - https://man.mtool.work/python/3.14/genindex-all.html
- 索引 — Python 3.14.8 ドキュメント 7354
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – N N (tkinter モジュール) N_TOKENS (token モジュール) n_waiting (asyncio.Barrier の属性) (threading.Barrier の属性) NAK (curses.ascii モ
...ule NL (curses.ascii モジュール) (token モジュール) nl() (curses モジュール) nl_langinfo() (locale モジュール) nlargest() (heapq モジュール) nlst() (ftplib.FTP のメソッド) nntplib module NO (tkinter モジュール) (tkinter.messagebox モジュール) no_anima...ttext.NullTranslations のメソッド) NS (tkinter モジュール) NSEW (tkinter モジュール) NSIG (signal モジュール) nsmallest() (heapq モジュール) NTEventLogHandler (logging.handlers のクラス) ntohl() (socket モジュール) ntohs() (socket モジュール) ntransfe... - https://man.mtool.work/python/3.14/genindex-N.html
- What's New in Python 2.3 — Python 3.14.8 ドキュメント 7354
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.3 テーマ 自動 ライト ダーク | What's New in Python 2.3 ¶ 著者 : A.M. Kuchling この文書は Python 2.3 の新機能について
...' ) >>> g . gr_name , g . gr_gid ('amk', 500) gzip モジュールが 2 GiB を超えるファイルを扱えるようになっています。 The new heapq module contains an implementation of a heap queue algorithm. A heap is an array-like data structure that keeps items in a...See https://xlinux.nist.gov/dads//HTML/priorityque.html for more information about the priority queue data structure.) The heapq module provides heappush() and heappop() functions for adding and removing items while maintaining the heap property on to...p of some other mutable Python sequence type. Here's an example that uses a Python list: >>> import heapq >>> heap = [] >>> for item in [ 3 , 7 , 5 , 11 , 1 ]: ... heapq . heappush ( heap , item ) ... >>> heap [1, 3, 5, 11, 7] >... - https://man.mtool.work/python/3.14/whatsnew/2.3.html
- What's New In Python 3.5 — Python 3.14.8 ドキュメント 7354
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.5 テーマ 自動 ライト ダーク | What's New In Python 3.5 ¶ エディタ : Elvis Pranskevichus < elvis @ magic . io >, Yur
...コンストラクタの mode 引数が排他的作成を要求する "x" を受け取るようになりました。 (Contributed by Tim Heaney in bpo-19222 .) heapq ¶ Element comparison in merge() can now be customized by passing a key function in a new optional key keyword argument, an...d a new optional reverse keyword argument can be used to reverse element comparison: >>> import heapq >>> a = [ '9' , '777' , '55555' ] >>> b = [ '88' , '6666' ] >>> list ( heapq . merge ( a , b , key = len )) ['9', '88', '7...77', '6666', '55555'] >>> list ( heapq . merge ( reversed ( a ), reversed ( b ), key = len , reverse = True )) ['55555', '6666', '777', '88', '9'] (Contributed b... - https://man.mtool.work/python/3.14/whatsnew/3.5.html