array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'class.ds-vector.php', 1 => 'Ds\\Vector', ), 'up' => array ( 0 => 'book.ds.php', 1 => 'Data Structures', ), 'prev' => array ( 0 => 'ds-sequence.unshift.php', 1 => 'Ds\\Sequence::unshift', ), 'next' => array ( 0 => 'ds-vector.allocate.php', 1 => 'Ds\\Vector::allocate', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds.vector.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.ds-vector.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ds >= 1.0.0)
A Vector is a sequence of values in a contiguous buffer that grows and shrinks automatically. It’s the most efficient sequential structure because a value’s index is a direct mapping to its index in the buffer, and the growth factor isn't bound to a specific multiple or exponent.