<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.other.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'book.ds.php',
    1 => 'Data Structures',
    2 => 'Data Structures',
  ),
  'up' => 
  array (
    0 => 'refs.basic.other.php',
    1 => '其它基本扩展',
  ),
  'prev' => 
  array (
    0 => 'function.untaint.php',
    1 => 'untaint',
  ),
  'next' => 
  array (
    0 => 'ds.setup.php',
    1 => '安装/配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/ds/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.ds.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.ds" class="book">
 
 <h1 class="title">Data Structures</h1>
 

 <div id="intro.ds" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
    PHP7高效的数据结构，可以作为 <span class="type"><a href="language.types.array.php" class="type array">array</a></span> 的替代.
  </p>
  <p class="para">
    点击 <a href="https://medium.com/p/9dda7af674cd" class="link external">&raquo;&nbsp;博客帖子</a> 查看
    基准，讨论和常见问题。
  </p>
 </div>

 






 







 






 







 






 






 







 






 






 






 






 






 







<ul class="chunklist chunklist_book"><li><a href="ds.setup.php">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="ds.requirements.php">需求</a></li><li><a href="ds.installation.php">安装</a></li></ul></li><li><a href="ds.examples.php">示例</a></li><li><a href="class.ds-collection.php">Ds\Collection</a> — The Collection interface<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-collection.clear.php">Ds\Collection::clear</a> — Removes all values</li><li><a href="ds-collection.copy.php">Ds\Collection::copy</a> — Returns a shallow copy of the collection</li><li><a href="ds-collection.isempty.php">Ds\Collection::isEmpty</a> — Returns whether the collection is empty</li><li><a href="ds-collection.toarray.php">Ds\Collection::toArray</a> — Converts the collection to an array</li></ul></li><li><a href="class.ds-hashable.php">Ds\Hashable</a> — The Hashable interface<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-hashable.equals.php">Ds\Hashable::equals</a> — Determines whether an object is equal to the current instance</li><li><a href="ds-hashable.hash.php">Ds\Hashable::hash</a> — Returns a scalar value to be used as a hash value</li></ul></li><li><a href="class.ds-sequence.php">Ds\Sequence</a> — The Sequence interface<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-sequence.allocate.php">Ds\Sequence::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-sequence.apply.php">Ds\Sequence::apply</a> — Updates all values by applying a callback function to each value</li><li><a href="ds-sequence.capacity.php">Ds\Sequence::capacity</a> — Returns the current capacity</li><li><a href="ds-sequence.contains.php">Ds\Sequence::contains</a> — Determines if the sequence contains given values</li><li><a href="ds-sequence.filter.php">Ds\Sequence::filter</a> — Creates a new sequence using a callable to
    determine which values to include</li><li><a href="ds-sequence.find.php">Ds\Sequence::find</a> — Attempts to find a value's index</li><li><a href="ds-sequence.first.php">Ds\Sequence::first</a> — Returns the first value in the sequence</li><li><a href="ds-sequence.get.php">Ds\Sequence::get</a> — Returns the value at a given index</li><li><a href="ds-sequence.insert.php">Ds\Sequence::insert</a> — Inserts values at a given index</li><li><a href="ds-sequence.join.php">Ds\Sequence::join</a> — Joins all values together as a string</li><li><a href="ds-sequence.last.php">Ds\Sequence::last</a> — Returns the last value</li><li><a href="ds-sequence.map.php">Ds\Sequence::map</a> — Returns the result of applying a callback to each value</li><li><a href="ds-sequence.merge.php">Ds\Sequence::merge</a> — Returns the result of adding all given values to the sequence</li><li><a href="ds-sequence.pop.php">Ds\Sequence::pop</a> — Removes and returns the last value</li><li><a href="ds-sequence.push.php">Ds\Sequence::push</a> — Adds values to the end of the sequence</li><li><a href="ds-sequence.reduce.php">Ds\Sequence::reduce</a> — Reduces the sequence to a single value using a callback function</li><li><a href="ds-sequence.remove.php">Ds\Sequence::remove</a> — Removes and returns a value by index</li><li><a href="ds-sequence.reverse.php">Ds\Sequence::reverse</a> — Reverses the sequence in-place</li><li><a href="ds-sequence.reversed.php">Ds\Sequence::reversed</a> — Returns a reversed copy</li><li><a href="ds-sequence.rotate.php">Ds\Sequence::rotate</a> — Rotates the sequence by a given number of rotations</li><li><a href="ds-sequence.set.php">Ds\Sequence::set</a> — Updates a value at a given index</li><li><a href="ds-sequence.shift.php">Ds\Sequence::shift</a> — Removes and returns the first value</li><li><a href="ds-sequence.slice.php">Ds\Sequence::slice</a> — Returns a sub-sequence of a given range</li><li><a href="ds-sequence.sort.php">Ds\Sequence::sort</a> — Sorts the sequence in-place</li><li><a href="ds-sequence.sorted.php">Ds\Sequence::sorted</a> — Returns a sorted copy</li><li><a href="ds-sequence.sum.php">Ds\Sequence::sum</a> — Returns the sum of all values in the sequence</li><li><a href="ds-sequence.unshift.php">Ds\Sequence::unshift</a> — Adds values to the front of the sequence</li></ul></li><li><a href="class.ds-vector.php">Ds\Vector</a> — The Vector class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-vector.allocate.php">Ds\Vector::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-vector.apply.php">Ds\Vector::apply</a> — Updates all values by applying a callback function to each value</li><li><a href="ds-vector.capacity.php">Ds\Vector::capacity</a> — Returns the current capacity</li><li><a href="ds-vector.clear.php">Ds\Vector::clear</a> — Removes all values</li><li><a href="ds-vector.construct.php">Ds\Vector::__construct</a> — Creates a new instance</li><li><a href="ds-vector.contains.php">Ds\Vector::contains</a> — Determines if the vector contains given values</li><li><a href="ds-vector.copy.php">Ds\Vector::copy</a> — Returns a shallow copy of the vector</li><li><a href="ds-vector.count.php">Ds\Vector::count</a> — Returns the number of values in the collection</li><li><a href="ds-vector.filter.php">Ds\Vector::filter</a> — Creates a new vector using a callable to
    determine which values to include</li><li><a href="ds-vector.find.php">Ds\Vector::find</a> — Attempts to find a value's index</li><li><a href="ds-vector.first.php">Ds\Vector::first</a> — Returns the first value in the vector</li><li><a href="ds-vector.get.php">Ds\Vector::get</a> — Returns the value at a given index</li><li><a href="ds-vector.insert.php">Ds\Vector::insert</a> — Inserts values at a given index</li><li><a href="ds-vector.isempty.php">Ds\Vector::isEmpty</a> — Returns whether the vector is empty</li><li><a href="ds-vector.join.php">Ds\Vector::join</a> — Joins all values together as a string</li><li><a href="ds-vector.jsonserialize.php">Ds\Vector::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-vector.last.php">Ds\Vector::last</a> — Returns the last value</li><li><a href="ds-vector.map.php">Ds\Vector::map</a> — Returns the result of applying a callback to each value</li><li><a href="ds-vector.merge.php">Ds\Vector::merge</a> — Returns the result of adding all given values to the vector</li><li><a href="ds-vector.pop.php">Ds\Vector::pop</a> — Removes and returns the last value</li><li><a href="ds-vector.push.php">Ds\Vector::push</a> — Adds values to the end of the vector</li><li><a href="ds-vector.reduce.php">Ds\Vector::reduce</a> — Reduces the vector to a single value using a callback function</li><li><a href="ds-vector.remove.php">Ds\Vector::remove</a> — Removes and returns a value by index</li><li><a href="ds-vector.reverse.php">Ds\Vector::reverse</a> — Reverses the vector in-place</li><li><a href="ds-vector.reversed.php">Ds\Vector::reversed</a> — Returns a reversed copy</li><li><a href="ds-vector.rotate.php">Ds\Vector::rotate</a> — Rotates the vector by a given number of rotations</li><li><a href="ds-vector.set.php">Ds\Vector::set</a> — Updates a value at a given index</li><li><a href="ds-vector.shift.php">Ds\Vector::shift</a> — Removes and returns the first value</li><li><a href="ds-vector.slice.php">Ds\Vector::slice</a> — Returns a sub-vector of a given range</li><li><a href="ds-vector.sort.php">Ds\Vector::sort</a> — Sorts the vector in-place</li><li><a href="ds-vector.sorted.php">Ds\Vector::sorted</a> — Returns a sorted copy</li><li><a href="ds-vector.sum.php">Ds\Vector::sum</a> — Returns the sum of all values in the vector</li><li><a href="ds-vector.toarray.php">Ds\Vector::toArray</a> — Converts the vector to an array</li><li><a href="ds-vector.unshift.php">Ds\Vector::unshift</a> — Adds values to the front of the vector</li></ul></li><li><a href="class.ds-deque.php">Ds\Deque</a> — The Deque class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-deque.allocate.php">Ds\Deque::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-deque.apply.php">Ds\Deque::apply</a> — Updates all values by applying a callback function to each value</li><li><a href="ds-deque.capacity.php">Ds\Deque::capacity</a> — Returns the current capacity</li><li><a href="ds-deque.clear.php">Ds\Deque::clear</a> — Removes all values from the deque</li><li><a href="ds-deque.construct.php">Ds\Deque::__construct</a> — Creates a new instance</li><li><a href="ds-deque.contains.php">Ds\Deque::contains</a> — Determines if the deque contains given values</li><li><a href="ds-deque.copy.php">Ds\Deque::copy</a> — Returns a shallow copy of the deque</li><li><a href="ds-deque.count.php">Ds\Deque::count</a> — Returns the number of values in the collection</li><li><a href="ds-deque.filter.php">Ds\Deque::filter</a> — Creates a new deque using a callable to
    determine which values to include</li><li><a href="ds-deque.find.php">Ds\Deque::find</a> — Attempts to find a value's index</li><li><a href="ds-deque.first.php">Ds\Deque::first</a> — Returns the first value in the deque</li><li><a href="ds-deque.get.php">Ds\Deque::get</a> — Returns the value at a given index</li><li><a href="ds-deque.insert.php">Ds\Deque::insert</a> — Inserts values at a given index</li><li><a href="ds-deque.isempty.php">Ds\Deque::isEmpty</a> — Returns whether the deque is empty</li><li><a href="ds-deque.join.php">Ds\Deque::join</a> — Joins all values together as a string</li><li><a href="ds-deque.jsonserialize.php">Ds\Deque::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-deque.last.php">Ds\Deque::last</a> — Returns the last value</li><li><a href="ds-deque.map.php">Ds\Deque::map</a> — Returns the result of applying a callback to each value</li><li><a href="ds-deque.merge.php">Ds\Deque::merge</a> — Returns the result of adding all given values to the deque</li><li><a href="ds-deque.pop.php">Ds\Deque::pop</a> — Removes and returns the last value</li><li><a href="ds-deque.push.php">Ds\Deque::push</a> — Adds values to the end of the deque</li><li><a href="ds-deque.reduce.php">Ds\Deque::reduce</a> — Reduces the deque to a single value using a callback function</li><li><a href="ds-deque.remove.php">Ds\Deque::remove</a> — Removes and returns a value by index</li><li><a href="ds-deque.reverse.php">Ds\Deque::reverse</a> — Reverses the deque in-place</li><li><a href="ds-deque.reversed.php">Ds\Deque::reversed</a> — Returns a reversed copy</li><li><a href="ds-deque.rotate.php">Ds\Deque::rotate</a> — Rotates the deque by a given number of rotations</li><li><a href="ds-deque.set.php">Ds\Deque::set</a> — Updates a value at a given index</li><li><a href="ds-deque.shift.php">Ds\Deque::shift</a> — Removes and returns the first value</li><li><a href="ds-deque.slice.php">Ds\Deque::slice</a> — Returns a sub-deque of a given range</li><li><a href="ds-deque.sort.php">Ds\Deque::sort</a> — Sorts the deque in-place</li><li><a href="ds-deque.sorted.php">Ds\Deque::sorted</a> — Returns a sorted copy</li><li><a href="ds-deque.sum.php">Ds\Deque::sum</a> — Returns the sum of all values in the deque</li><li><a href="ds-deque.toarray.php">Ds\Deque::toArray</a> — Converts the deque to an array</li><li><a href="ds-deque.unshift.php">Ds\Deque::unshift</a> — Adds values to the front of the deque</li></ul></li><li><a href="class.ds-map.php">Ds\Map</a> — The Map class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-map.allocate.php">Ds\Map::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-map.apply.php">Ds\Map::apply</a> — Updates all values by applying a callback function to each value</li><li><a href="ds-map.capacity.php">Ds\Map::capacity</a> — Returns the current capacity</li><li><a href="ds-map.clear.php">Ds\Map::clear</a> — Removes all values</li><li><a href="ds-map.construct.php">Ds\Map::__construct</a> — Creates a new instance</li><li><a href="ds-map.copy.php">Ds\Map::copy</a> — Returns a shallow copy of the map</li><li><a href="ds-map.count.php">Ds\Map::count</a> — Returns the number of values in the map</li><li><a href="ds-map.diff.php">Ds\Map::diff</a> — Creates a new map using keys that aren't in another map</li><li><a href="ds-map.filter.php">Ds\Map::filter</a> — Creates a new map using a callable to determine which pairs to include</li><li><a href="ds-map.first.php">Ds\Map::first</a> — Returns the first pair in the map</li><li><a href="ds-map.get.php">Ds\Map::get</a> — Returns the value for a given key</li><li><a href="ds-map.haskey.php">Ds\Map::hasKey</a> — Determines whether the map contains a given key</li><li><a href="ds-map.hasvalue.php">Ds\Map::hasValue</a> — Determines whether the map contains a given value</li><li><a href="ds-map.intersect.php">Ds\Map::intersect</a> — Creates a new map by intersecting keys with another map</li><li><a href="ds-map.isempty.php">Ds\Map::isEmpty</a> — Returns whether the map is empty</li><li><a href="ds-map.jsonserialize.php">Ds\Map::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-map.keys.php">Ds\Map::keys</a> — Returns a set of the map's keys</li><li><a href="ds-map.ksort.php">Ds\Map::ksort</a> — Sorts the map in-place by key</li><li><a href="ds-map.ksorted.php">Ds\Map::ksorted</a> — Returns a copy, sorted by key</li><li><a href="ds-map.last.php">Ds\Map::last</a> — Returns the last pair of the map</li><li><a href="ds-map.map.php">Ds\Map::map</a> — Returns the result of applying a callback to each value</li><li><a href="ds-map.merge.php">Ds\Map::merge</a> — Returns the result of adding all given associations</li><li><a href="ds-map.pairs.php">Ds\Map::pairs</a> — Returns a sequence containing all the pairs of the map</li><li><a href="ds-map.put.php">Ds\Map::put</a> — Associates a key with a value</li><li><a href="ds-map.putall.php">Ds\Map::putAll</a> — Associates all key-value pairs of a traversable object or array</li><li><a href="ds-map.reduce.php">Ds\Map::reduce</a> — Reduces the map to a single value using a callback function</li><li><a href="ds-map.remove.php">Ds\Map::remove</a> — Removes and returns a value by key</li><li><a href="ds-map.reverse.php">Ds\Map::reverse</a> — Reverses the map in-place</li><li><a href="ds-map.reversed.php">Ds\Map::reversed</a> — Returns a reversed copy</li><li><a href="ds-map.skip.php">Ds\Map::skip</a> — Returns the pair at a given positional index</li><li><a href="ds-map.slice.php">Ds\Map::slice</a> — Returns a subset of the map defined by a starting index and length</li><li><a href="ds-map.sort.php">Ds\Map::sort</a> — Sorts the map in-place by value</li><li><a href="ds-map.sorted.php">Ds\Map::sorted</a> — Returns a copy, sorted by value</li><li><a href="ds-map.sum.php">Ds\Map::sum</a> — Returns the sum of all values in the map</li><li><a href="ds-map.toarray.php">Ds\Map::toArray</a> — Converts the map to an array</li><li><a href="ds-map.union.php">Ds\Map::union</a> — Creates a new map using values from the current instance and another map</li><li><a href="ds-map.values.php">Ds\Map::values</a> — Returns a sequence of the map's values</li><li><a href="ds-map.xor.php">Ds\Map::xor</a> — Creates a new map using keys of either the current instance or of another map, but not of both</li></ul></li><li><a href="class.ds-pair.php">Ds\Pair</a> — The Pair class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-pair.clear.php">Ds\Pair::clear</a> — Removes all values</li><li><a href="ds-pair.construct.php">Ds\Pair::__construct</a> — Creates a new instance</li><li><a href="ds-pair.copy.php">Ds\Pair::copy</a> — Returns a shallow copy of the pair</li><li><a href="ds-pair.isempty.php">Ds\Pair::isEmpty</a> — Returns whether the pair is empty</li><li><a href="ds-pair.jsonserialize.php">Ds\Pair::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-pair.toarray.php">Ds\Pair::toArray</a> — Converts the pair to an array</li></ul></li><li><a href="class.ds-set.php">Ds\Set</a> — The Set class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-set.add.php">Ds\Set::add</a> — Adds values to the set</li><li><a href="ds-set.allocate.php">Ds\Set::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-set.capacity.php">Ds\Set::capacity</a> — Returns the current capacity</li><li><a href="ds-set.clear.php">Ds\Set::clear</a> — Removes all values</li><li><a href="ds-set.construct.php">Ds\Set::__construct</a> — Creates a new instance</li><li><a href="ds-set.contains.php">Ds\Set::contains</a> — Determines if the set contains all values</li><li><a href="ds-set.copy.php">Ds\Set::copy</a> — Returns a shallow copy of the set</li><li><a href="ds-set.count.php">Ds\Set::count</a> — Returns the number of values in the set</li><li><a href="ds-set.diff.php">Ds\Set::diff</a> — Creates a new set using values that aren't in another set</li><li><a href="ds-set.filter.php">Ds\Set::filter</a> — Creates a new set using a callable to
    determine which values to include</li><li><a href="ds-set.first.php">Ds\Set::first</a> — Returns the first value in the set</li><li><a href="ds-set.get.php">Ds\Set::get</a> — Returns the value at a given index</li><li><a href="ds-set.intersect.php">Ds\Set::intersect</a> — Creates a new set by intersecting values with another set</li><li><a href="ds-set.isempty.php">Ds\Set::isEmpty</a> — Returns whether the set is empty</li><li><a href="ds-set.join.php">Ds\Set::join</a> — Joins all values together as a string</li><li><a href="ds-set.jsonserialize.php">Ds\Set::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-set.last.php">Ds\Set::last</a> — Returns the last value in the set</li><li><a href="ds-set.map.php">Ds\Set::map</a> — Returns the result of applying a callback to each value</li><li><a href="ds-set.merge.php">Ds\Set::merge</a> — Returns the result of adding all given values to the set</li><li><a href="ds-set.reduce.php">Ds\Set::reduce</a> — Reduces the set to a single value using a callback function</li><li><a href="ds-set.remove.php">Ds\Set::remove</a> — Removes all given values from the set</li><li><a href="ds-set.reverse.php">Ds\Set::reverse</a> — Reverses the set in-place</li><li><a href="ds-set.reversed.php">Ds\Set::reversed</a> — Returns a reversed copy</li><li><a href="ds-set.slice.php">Ds\Set::slice</a> — Returns a sub-set of a given range</li><li><a href="ds-set.sort.php">Ds\Set::sort</a> — Sorts the set in-place</li><li><a href="ds-set.sorted.php">Ds\Set::sorted</a> — Returns a sorted copy</li><li><a href="ds-set.sum.php">Ds\Set::sum</a> — Returns the sum of all values in the set</li><li><a href="ds-set.toarray.php">Ds\Set::toArray</a> — Converts the set to an array</li><li><a href="ds-set.union.php">Ds\Set::union</a> — Creates a new set using values from the current instance and another set</li><li><a href="ds-set.xor.php">Ds\Set::xor</a> — Creates a new set using values in either the current instance or in another set, but not in both</li></ul></li><li><a href="class.ds-stack.php">Ds\Stack</a> — The Stack class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-stack.allocate.php">Ds\Stack::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-stack.capacity.php">Ds\Stack::capacity</a> — Returns the current capacity</li><li><a href="ds-stack.clear.php">Ds\Stack::clear</a> — Removes all values</li><li><a href="ds-stack.construct.php">Ds\Stack::__construct</a> — Creates a new instance</li><li><a href="ds-stack.copy.php">Ds\Stack::copy</a> — Returns a shallow copy of the stack</li><li><a href="ds-stack.count.php">Ds\Stack::count</a> — Returns the number of values in the stack</li><li><a href="ds-stack.isempty.php">Ds\Stack::isEmpty</a> — Returns whether the stack is empty</li><li><a href="ds-stack.jsonserialize.php">Ds\Stack::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-stack.peek.php">Ds\Stack::peek</a> — Returns the value at the top of the stack</li><li><a href="ds-stack.pop.php">Ds\Stack::pop</a> — Removes and returns the value at the top of the stack</li><li><a href="ds-stack.push.php">Ds\Stack::push</a> — Pushes values onto the stack</li><li><a href="ds-stack.toarray.php">Ds\Stack::toArray</a> — Converts the stack to an array</li></ul></li><li><a href="class.ds-queue.php">Ds\Queue</a> — The Queue class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-queue.allocate.php">Ds\Queue::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-queue.capacity.php">Ds\Queue::capacity</a> — Returns the current capacity</li><li><a href="ds-queue.clear.php">Ds\Queue::clear</a> — Removes all values</li><li><a href="ds-queue.construct.php">Ds\Queue::__construct</a> — Creates a new instance</li><li><a href="ds-queue.copy.php">Ds\Queue::copy</a> — Returns a shallow copy of the queue</li><li><a href="ds-queue.count.php">Ds\Queue::count</a> — Returns the number of values in the queue</li><li><a href="ds-queue.isempty.php">Ds\Queue::isEmpty</a> — Returns whether the queue is empty</li><li><a href="ds-queue.jsonserialize.php">Ds\Queue::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-queue.peek.php">Ds\Queue::peek</a> — Returns the value at the front of the queue</li><li><a href="ds-queue.pop.php">Ds\Queue::pop</a> — Removes and returns the value at the front of the queue</li><li><a href="ds-queue.push.php">Ds\Queue::push</a> — Pushes values into the queue</li><li><a href="ds-queue.toarray.php">Ds\Queue::toArray</a> — Converts the queue to an array</li></ul></li><li><a href="class.ds-priorityqueue.php">Ds\PriorityQueue</a> — The PriorityQueue class<ul class="chunklist chunklist_book chunklist_children"><li><a href="ds-priorityqueue.allocate.php">Ds\PriorityQueue::allocate</a> — Allocates enough memory for a required capacity</li><li><a href="ds-priorityqueue.capacity.php">Ds\PriorityQueue::capacity</a> — Returns the current capacity</li><li><a href="ds-priorityqueue.clear.php">Ds\PriorityQueue::clear</a> — Removes all values</li><li><a href="ds-priorityqueue.construct.php">Ds\PriorityQueue::__construct</a> — Creates a new instance</li><li><a href="ds-priorityqueue.copy.php">Ds\PriorityQueue::copy</a> — Returns a shallow copy of the queue</li><li><a href="ds-priorityqueue.count.php">Ds\PriorityQueue::count</a> — Returns the number of values in the queue</li><li><a href="ds-priorityqueue.isempty.php">Ds\PriorityQueue::isEmpty</a> — Returns whether the queue is empty</li><li><a href="ds-priorityqueue.jsonserialize.php">Ds\PriorityQueue::jsonSerialize</a> — Returns a representation that can be converted to JSON</li><li><a href="ds-priorityqueue.peek.php">Ds\PriorityQueue::peek</a> — Returns the value at the front of the queue</li><li><a href="ds-priorityqueue.pop.php">Ds\PriorityQueue::pop</a> — Removes and returns the value with the highest priority</li><li><a href="ds-priorityqueue.push.php">Ds\PriorityQueue::push</a> — Pushes values into the queue</li><li><a href="ds-priorityqueue.toarray.php">Ds\PriorityQueue::toArray</a> — Converts the queue to an array</li></ul></li></ul></div><?php manual_footer($setup); ?>