The SplMaxHeap class

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

Giriş

The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top.

Sınıf Sözdizimi

class SplMaxHeap extends SplHeap {
/* Yöntemler */
protected function compare(mixed $value1, mixed $value2): int
/* Miras alınan yöntemler */
protected function SplHeap::compare(mixed $value1, mixed $value2): int
public function SplHeap::count(): int
public function SplHeap::current(): mixed
public function SplHeap::extract(): mixed
public function SplHeap::insert(mixed $value): true
public function SplHeap::isCorrupted(): bool
public function SplHeap::isEmpty(): bool
public function SplHeap::key(): int
public function SplHeap::next(): void
public function SplHeap::rewind(): void
public function SplHeap::top(): mixed
public function SplHeap::valid(): bool
}

İçindekiler

  • SplMaxHeap::compare — Compare elements in order to place them correctly in the heap while sifting up
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top