Results of 1 - 10 of about 12 for heappushpop (0.022 sec.)
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 12522
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...nvariant. If the heap is empty, IndexError is raised. To access the smallest item without popping it, use heap[0] . heapq. heappushpop ( heap , item ) ¶ item を heap に push した後、pop を行って heap から最初の要素を返します。この一続きの動作を heappush() に...返し、それを item と置き換えます。 返される値は加えられた item よりも大きくなるかもしれません。それを望まないなら、代わりに heappushpop() を使うことを考えてください。この push/pop の組み合わせは二つの値の小さい方を返し、大きい方の値をヒープに残します。 For m...empty, IndexError is raised. To access the largest item without popping it, use maxheap[0] . Added in version 3.14. heapq. heappushpop_max ( heap , item ) ¶ Push item on the max-heap heap , then pop and return the largest item from heap . The combined actio... - https://man.mtool.work/python/3.14/library/heapq.html
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 11656
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...nvariant. If the heap is empty, IndexError is raised. To access the smallest item without popping it, use heap[0] . heapq. heappushpop ( heap , item ) ¶ item を heap に push した後、pop を行って heap から最初の要素を返します。この一続きの動作を heappush() に...返し、それを item と置き換えます。 返される値は加えられた item よりも大きくなるかもしれません。それを望まないなら、代わりに heappushpop() を使うことを考えてください。この push/pop の組み合わせは二つの値の小さい方を返し、大きい方の値をヒープに残します。 For m...empty, IndexError is raised. To access the largest item without popping it, use maxheap[0] . Added in version 3.14. heapq. heappushpop_max ( heap , item ) ¶ Push item on the max-heap heap , then pop and return the largest item from heap . The combined actio... - https://man.mtool.work/python/3.14/library/heapq.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9639
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...llections import Counter , deque from contextlib import suppress from functools import reduce from heapq import heappush , heappushpop , heappush_max , heappushpop_max from math import comb , isqrt , prod , sumprod from operator import getitem , is_not , it...= [] # min-heap the same size as or one smaller than lo with suppress ( StopIteration ): while True : heappush_max ( lo , heappushpop ( hi , read ())) yield lo [ 0 ] heappush ( hi , heappushpop_max ( lo , read ())) yield ( lo [ 0 ] + hi [ 0 ]) / 2 def runn... - https://man.mtool.work/python/3.14/library/itertools.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9639
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...llections import Counter , deque from contextlib import suppress from functools import reduce from heapq import heappush , heappushpop , heappush_max , heappushpop_max from math import comb , isqrt , prod , sumprod from operator import getitem , is_not , it...= [] # min-heap the same size as or one smaller than lo with suppress ( StopIteration ): while True : heappush_max ( lo , heappushpop ( hi , read ())) yield lo [ 0 ] heappush ( hi , heappushpop_max ( lo , read ())) yield ( lo [ 0 ] + hi [ 0 ]) / 2 def runn... - https://man.mtool.work/python/3.14/library/itertools.html
- 索引 — Python 3.14.8 ドキュメント 9356
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – H halfdelay() (curses モジュール) Handle (asyncio のクラス) handle() (http.server.BaseHTTPRequestHandler のメソッド) (logging.Handler
...ppop() (heapq モジュール) heappop_max() (heapq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq module heapreplace() (heapq モジュール) heapreplace_max()... - https://man.mtool.work/python/3.14/genindex-H.html
- 索引 — Python 3.14.8 ドキュメント 9356
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – H halfdelay() (curses モジュール) Handle (asyncio のクラス) handle() (http.server.BaseHTTPRequestHandler のメソッド) (logging.Handler
...ppop() (heapq モジュール) heappop_max() (heapq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq module heapreplace() (heapq モジュール) heapreplace_max()... - https://man.mtool.work/python/3.14/genindex-H.html
- 索引 — Python 3.14.8 ドキュメント 7358
- ナビゲーション 索引 モジュール | 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 | イ | エ | オ | カ | キ
...ppop() (heapq モジュール) heappop_max() (heapq モジュール) heappush() (heapq モジュール) heappush_max() (heapq モジュール) heappushpop() (heapq モジュール) heappushpop_max() (heapq モジュール) heapq module heapreplace() (heapq モジュール) heapreplace_max()... - https://man.mtool.work/python/3.14/genindex-all.html
- What's New in Python 2.6 — Python 3.14.8 ドキュメント 7358
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.6 テーマ 自動 ライト ダーク | What's New in Python 2.6 ¶ 著者 : A.M. Kuchling (amk at amk.ca) This article explains
...す。---)。例えば: >>> list ( heapq . merge ([ 1 , 3 , 5 , 9 ], [ 2 , 8 , 16 ])) [1, 2, 3, 5, 8, 9, 16] Another new function, heappushpop(heap, item) , pushes item onto heap , then pops off and returns the smallest item. This is more efficient than making a ca... - https://man.mtool.work/python/3.14/whatsnew/2.6.html
- What's new in Python 3.14 — Python 3.14.8 ドキュメント 7358
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's new in Python 3.14 テーマ 自動 ライト ダーク | What's new in Python 3.14 ¶ エディタ : Adam Turner と Hugo van Kemenade この記事では
...for working with max-heaps, via the following new functions: heapify_max() heappush_max() heappop_max() heapreplace_max() heappushpop_max() hmac ¶ Add a built-in implementation for HMAC ( RFC 2104 ) using formally verified code from the HACL* project. This... - https://man.mtool.work/python/3.14/whatsnew/3.14.html
- What's New in Python 2.6 — Python 3.14.8 ドキュメント 7358
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.6 テーマ 自動 ライト ダーク | What's New in Python 2.6 ¶ 著者 : A.M. Kuchling (amk at amk.ca) This article explains
...す。---)。例えば: >>> list ( heapq . merge ([ 1 , 3 , 5 , 9 ], [ 2 , 8 , 16 ])) [1, 2, 3, 5, 8, 9, 16] Another new function, heappushpop(heap, item) , pushes item onto heap , then pops off and returns the smallest item. This is more efficient than making a ca... - https://man.mtool.work/python/3.14/whatsnew/2.6.html