« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 16 for PriorityQueue (0.001 sec.)
The PriorityQueue class | PHP 8.3 12996
The PriorityQueue class (PECL ds >= 1.0.0) はじめに A PriorityQueue is very similar to a Queue. Values are pushed into the queue with an assigned priority, and the value with the highest priority will always be at the front of the queue. Im ... a max heap. 注意 : "First in, first out" ordering is preserved for values with the same priority. 注意 : Iterating over a PriorityQueue is destructive, equivalent to successive pop operations until the queue is empty. クラス概要 class Ds\PriorityQueue implem ... locate ( int $capacity ): void public function capacity (): int public function clear (): void public function copy (): Ds\PriorityQueue public function isEmpty (): bool public function peek (): mixed public function pop (): mixed public function push ( mixed ... $value , int $priority ): void public function toArray (): array } 定義済み定数 Ds\PriorityQueue::MIN_CAPACITY 目次 Ds\PriorityQueue::allocate — Allocates enough memory for a required capacity Ds\PriorityQueue::capacity ...
https://man.mtool.work/php/8.3/class.ds-priorityqueue.html
Ds\PriorityQueue::__construct — Creates a new instance | PHP 8.3 10223
Ds\PriorityQueue::__construct (PECL ds >= 1.0.0) Ds\PriorityQueue::__construct — Creates a new instance 説明 public function Ds\PriorityQueue::__construct () Creates a new instance. 例 例1 Ds\PriorityQueue::__construct() example <?php $queu ... e = new \Ds\PriorityQueue (); var_dump ( $queue ); ?> 上の例の出力は、 たとえば以下のようになります。 object(Ds\PriorityQueue)#1 (0) { } 他のマニュア ...
https://man.mtool.work/php/8.3/ds-priorityqueue.construct.html
Ds\PriorityQueue::copy — Returns a shallow copy of the queue | PHP 8.3 10223
Ds\PriorityQueue::copy (PECL ds >= 1.0.0) Ds\PriorityQueue::copy — Returns a shallow copy of the queue 説明 public function Ds\PriorityQueue::copy (): Ds\PriorityQueue Returns a shallow copy of the queue. パラメータ この関数にはパラメータは ... ありません。 戻り値 Returns a shallow copy of the queue. 例 例1 Ds\PriorityQueue::copy() example <?php $queue = new \Ds\PriorityQueue (); $queue -> push ( "a" , 5 ); $queue -> push ( "b" , 15 ); $queue - ... > push ( "c" , 10 ); print_r ( $queue -> copy ()); ?> 上の例の出力は、 たとえば以下のようになります。 Ds\PriorityQueue Object ( [0] => b [1] => c [2] => a ) 他のマニュアルの関連ページ Python queue Python filecmp Python copy Linux JM msgctl(2 ...
https://man.mtool.work/php/8.3/ds-priorityqueue.copy.html
Ds\PriorityQueue::clear — Removes all values | PHP 8.3 9513
Ds\PriorityQueue::clear (PECL ds >= 1.0.0) Ds\PriorityQueue::clear — Removes all values 説明 public function Ds\PriorityQueue::clear (): void Removes all values from the queue. パラメータ この関数にはパラメータはありません。 戻り値 値を返し ... ません。 例 例1 Ds\PriorityQueue::clear() example <?php $queue = new \Ds\PriorityQueue (); $queue -> push ( "a" , 5 ); $queue -> push ( "b" , 15 ); $queue ... -> push ( "c" , 10 ); $queue -> clear (); print_r ( $queue ); ?> 上の例の出力は、 たとえば以下のようになります。 Ds\PriorityQueue Object ( ) 他のマニュアルの関連ページ Python queue Linux JM msgctl(2) Docker docker-compose push Python asyncio-threading ...
https://man.mtool.work/php/8.3/ds-priorityqueue.clear.html
Ds\PriorityQueue::isEmpty — Returns whether the queue is empty | PHP 8.3 9513
Ds\PriorityQueue::isEmpty (PECL ds >= 1.0.0) Ds\PriorityQueue::isEmpty — Returns whether the queue is empty 説明 public function Ds\PriorityQueue::isEmpty (): bool Returns whether the queue is empty. パラメータ この関数にはパラメータはありま ... せん。 戻り値 Returns true if the queue is empty, false otherwise. 例 例1 Ds\PriorityQueue::isEmpty() example <?php $a = new \Ds\PriorityQueue (); $b = new \Ds\PriorityQueue (); $a -> push ( "a" , 5 ); $a -> push ...
https://man.mtool.work/php/8.3/ds-priorityqueue.isempty.html
Ds\PriorityQueue::capacity — Returns the current capacity | PHP 8.3 9184
Ds\PriorityQueue::capacity (PECL ds >= 1.0.0) Ds\PriorityQueue::capacity — Returns the current capacity 説明 public function Ds\PriorityQueue::capacity (): int Returns the current capacity. パラメータ この関数にはパラメータはありません。 戻 ... り値 The current capacity. 例 例1 Ds\PriorityQueue::capacity() example <?php $queue = new \Ds\PriorityQueue (); var_dump ( $queue -> capacity ()); ?> 上の例の出力は、 たとえ ...
https://man.mtool.work/php/8.3/ds-priorityqueue.capacity.html
Ds\PriorityQueue::peek — Returns the value at the front of the queue | PHP 8.3 8750
Ds\PriorityQueue::peek (PECL ds >= 1.0.0) Ds\PriorityQueue::peek — Returns the value at the front of the queue 説明 public function Ds\PriorityQueue::peek (): mixed Returns the value at the front of the queue, but does not remove it. パラメ ... はパラメータはありません。 戻り値 The value at the front of the queue. エラー / 例外 UnderflowException if empty. 例 例1 Ds\PriorityQueue::peek() example <?php $queue = new \Ds\PriorityQueue (); $queue -> push ( "a" , 5 ); $queue -> push ( "b" , 15 ); $queue - ...
https://man.mtool.work/php/8.3/ds-priorityqueue.peek.html
Ds\PriorityQueue::allocate — Allocates enough memory for a required capacity | ... 8594
Ds\PriorityQueue::allocate (PECL ds >= 1.0.0) Ds\PriorityQueue::allocate — Allocates enough memory for a required capacity 説明 public function Ds\PriorityQueue::allocate ( int $capacity ): void Ensures that enough memory is allocated for a ... e current capacity. 注意 : Capacity will always be rounded up to the nearest power of 2. 戻り値 値を返しません。 例 例1 Ds\PriorityQueue::allocate() example <?php $queue = new \Ds\PriorityQueue (); var_dump ( $queue -> capacity ()); $queue -> allocate ( 100 ) ...
https://man.mtool.work/php/8.3/ds-priorityqueue.allocate.html
Ds\PriorityQueue::push — Pushes values into the queue | PHP 8.3 8594
Ds\PriorityQueue::push (PECL ds >= 1.0.0) Ds\PriorityQueue::push — Pushes values into the queue 説明 public function Ds\PriorityQueue::push ( mixed $value , int $priority ): void Pushes a value with a given priority into the queue. パラメー ... value The value to push into the queue. priority The priority associated with the value. 戻り値 値を返しません。 例 例1 Ds\PriorityQueue::push() example <?php $queue = new \Ds\PriorityQueue (); $queue -> push ( "a" , 5 ); $queue -> push ( "b" , 15 ); $queue - ...
https://man.mtool.work/php/8.3/ds-priorityqueue.push.html
Data Structures | PHP 8.3 8525
Data Structures はじめに Efficient data structures for PHP 7, provided as an alternative to the array . See » this blog post for benchmarks, discussion and frequently asked questions. インストール/設定 要件 インストール手順 例 Ds\Collection ... the front of the queue Ds\Queue::push — Pushes values into the queue Ds\Queue::toArray — Converts the queue to an array Ds\PriorityQueue — The PriorityQueue class Ds\PriorityQueue::allocate — Allocates enough memory for a required capacity Ds\PriorityQueue::c ... apacity — Returns the current capacity Ds\PriorityQueue::clear — Removes all values Ds\PriorityQueue::__construct — Creates a new instance Ds\PriorityQueue::copy — Returns a shal ... low copy of the queue Ds\PriorityQueue::count — Returns the number of values in the queue Ds\PriorityQueue::isEmpty — Returns whether the queue is empty Ds\Prior ...
https://man.mtool.work/php/8.3/book.ds.html
PREV 1 2 NEXT