Results of 1 - 10 of about 12 for invariant (0.018 sec.)
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 12752
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...for which every parent node has a value less than or equal to any of its children. We refer to this condition as the heap invariant. For min-heaps, this implementation uses lists for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k for w...nteresting property of a min-heap is that its smallest element is always the root, heap[0] . Max-heaps satisfy the reverse invariant: every parent node has a value greater than any of its children. These are implemented as lists for which maxheap[2*k+1] <...mpared elements 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 relati... - https://man.mtool.work/python/3.14/library/heapq.html
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 12752
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...for which every parent node has a value less than or equal to any of its children. We refer to this condition as the heap invariant. For min-heaps, this implementation uses lists for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k for w...nteresting property of a min-heap is that its smallest element is always the root, heap[0] . Max-heaps satisfy the reverse invariant: every parent node has a value greater than any of its children. These are implemented as lists for which maxheap[2*k+1] <...mpared elements 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 relati... - https://man.mtool.work/python/3.14/library/heapq.html
- キュー — Python 3.14.8 ドキュメント 8437
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » キュー テーマ 自動 ライト ダーク | キュー ¶ ソースコード: Lib/asyncio/q
...oin() with immediate set to true. This unblocks the join even when no work has been done on the tasks, violating the usual invariant for joining a queue. Added in version 3.13. task_done ( ) ¶ Indicate that a formerly enqueued work item is complete. Used... - https://man.mtool.work/python/3.14/library/asyncio-queue.html
- キュー — Python 3.14.8 ドキュメント 8437
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » キュー テーマ 自動 ライト ダーク | キュー ¶ ソースコード: Lib/asyncio/q
...oin() with immediate set to true. This unblocks the join even when no work has been done on the tasks, violating the usual invariant for joining a queue. Added in version 3.13. task_done ( ) ¶ Indicate that a formerly enqueued work item is complete. Used... - https://man.mtool.work/python/3.14/library/asyncio-queue.html
- queue --- 同期キュークラス — Python 3.14.8 ドキュメント 8277
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » queue --- 同期キュークラス テーマ 自動 ライト ダーク | queue --- 同期キュークラス ¶ ソースコード: Lib/queue.py The queue
...oin() with immediate set to true. This unblocks the join even when no work has been done on the tasks, violating the usual invariant for joining a queue. Added in version 3.13. SimpleQueue オブジェクト ¶ SimpleQueue オブジェクトは以下のpublicメソッドを提供... - https://man.mtool.work/python/3.14/library/queue.html
- queue --- 同期キュークラス — Python 3.14.8 ドキュメント 8277
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » queue --- 同期キュークラス テーマ 自動 ライト ダーク | queue --- 同期キュークラス ¶ ソースコード: Lib/queue.py The queue
...oin() with immediate set to true. This unblocks the join even when no work has been done on the tasks, violating the usual invariant for joining a queue. Added in version 3.13. SimpleQueue オブジェクト ¶ SimpleQueue オブジェクトは以下のpublicメソッドを提供... - https://man.mtool.work/python/3.14/library/queue.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 7959
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...many other generic classes in the standard library, the SendType of Generator behaves contravariantly, not covariantly or invariantly. The SendType and ReturnType parameters default to None : def infinite_stream ( start : int ) -> Generator [ int ]: whil...w for things like narrowing list[object] to list[str] even though the latter is not a subtype of the former, since list is invariant. When a TypeGuard function returns True , type checkers narrow the type of the variable to exactly the TypeGuard type. Whe...variant or contravariant by passing covariant=True or contravariant=True . By default, manually created type variables are invariant. See PEP 484 and PEP 695 for more details. Bounded type variables and constrained type variables have different semantics... - https://man.mtool.work/python/3.14/library/typing.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 7959
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...many other generic classes in the standard library, the SendType of Generator behaves contravariantly, not covariantly or invariantly. The SendType and ReturnType parameters default to None : def infinite_stream ( start : int ) -> Generator [ int ]: whil...w for things like narrowing list[object] to list[str] even though the latter is not a subtype of the former, since list is invariant. When a TypeGuard function returns True , type checkers narrow the type of the variable to exactly the TypeGuard type. Whe...variant or contravariant by passing covariant=True or contravariant=True . By default, manually created type variables are invariant. See PEP 484 and PEP 695 for more details. Bounded type variables and constrained type variables have different semantics... - https://man.mtool.work/python/3.14/library/typing.html
- プログラミング FAQ — Python 3.14.8 ドキュメント 7800
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python よくある質問 » プログラミング FAQ テーマ 自動 ライト ダーク | プログラミング FAQ ¶ 一般的な質問 ¶ ブレークポイントやステップ実行ができる、ソースコードレベ
...ます: >>> help ( divmod ) Help on built-in function divmod in module builtins: divmod(x, y, /) Return the tuple (x//y, x%y). Invariant: div*y + mod == x. この引数リストの末尾にスラッシュは、この2つの仮引数が両方とも位置専用引数であることを意味します。 したが... - https://man.mtool.work/python/3.14/faq/programming.html
- decimal --- 10進固定小数点と浮動小数点の演算 — Python 3.14.8 ドキュメント 7800
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » decimal --- 10進固定小数点と浮動小数点の演算 テーマ 自動 ライト ダーク | decimal --- 10進固定小数点と浮動小数
...ct ])) Traceback (most recent call last): ... Inexact : None Q: Once I have valid two place inputs, how do I maintain that invariant throughout an application? A: Some operations like addition, subtraction, and multiplication by an integer will automatica... - https://man.mtool.work/python/3.14/library/decimal.html