<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/spl.datastructures.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'class.splheap.php',
    1 => 'SplHeap',
    2 => 'The SplHeap class',
  ),
  'up' => 
  array (
    0 => 'spl.datastructures.php',
    1 => 'Datastructures',
  ),
  'prev' => 
  array (
    0 => 'splqueue.enqueue.php',
    1 => 'SplQueue::enqueue',
  ),
  'next' => 
  array (
    0 => 'splheap.compare.php',
    1 => 'SplHeap::compare',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/splheap.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.splheap.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.splheap" class="reference">
 <h1 class="title">The SplHeap class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p>
 

  <div class="section" id="splheap.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The SplHeap class provides the main functionalities of a Heap.
   </p>
  </div>

 
  <div class="section" id="splheap.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">abstract</span>
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">SplHeap</strong></strong>
    

    
     <span class="modifier">implements</span>
      <a href="class.iterator.php" class="interfacename">Iterator</a>,

     <a href="class.countable.php" class="interfacename">Countable</a> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">protected</span> <span class="methodname"><a href="splheap.compare.php" class="methodname">compare</a></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value1</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value2</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.count.php" class="methodname">count</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.current.php" class="methodname">current</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.extract.php" class="methodname">extract</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.insert.php" class="methodname">insert</a></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.iscorrupted.php" class="methodname">isCorrupted</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.isempty.php" class="methodname">isEmpty</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.key.php" class="methodname">key</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.next.php" class="methodname">next</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.recoverfromcorruption.php" class="methodname">recoverFromCorruption</a></span>(): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.rewind.php" class="methodname">rewind</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.top.php" class="methodname">top</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="splheap.valid.php" class="methodname">valid</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>
 
  </div>
 

 
 </div>
 
 
































































 
<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="splheap.compare.php">SplHeap::compare</a> — Compare elements in order to place them correctly in the heap while sifting up</li><li><a href="splheap.count.php">SplHeap::count</a> — Counts the number of elements in the heap</li><li><a href="splheap.current.php">SplHeap::current</a> — Return current node pointed by the iterator</li><li><a href="splheap.extract.php">SplHeap::extract</a> — Extracts a node from top of the heap and sift up</li><li><a href="splheap.insert.php">SplHeap::insert</a> — Inserts an element in the heap by sifting it up</li><li><a href="splheap.iscorrupted.php">SplHeap::isCorrupted</a> — Tells if the heap is in a corrupted state</li><li><a href="splheap.isempty.php">SplHeap::isEmpty</a> — Checks whether the heap is empty</li><li><a href="splheap.key.php">SplHeap::key</a> — Return current node index</li><li><a href="splheap.next.php">SplHeap::next</a> — Move to the next node</li><li><a href="splheap.recoverfromcorruption.php">SplHeap::recoverFromCorruption</a> — Recover from the corrupted state and allow further actions on the heap</li><li><a href="splheap.rewind.php">SplHeap::rewind</a> — Rewind iterator back to the start (no-op)</li><li><a href="splheap.top.php">SplHeap::top</a> — Peeks at the node from the top of the heap</li><li><a href="splheap.valid.php">SplHeap::valid</a> — Check whether the heap contains more nodes</li></ul>
</div>
<?php manual_footer($setup); ?>