UNPKG

min-heap-typed

Version:
432 lines (428 loc) 68.5 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MinHeap | min-heap-typed</title><meta name="description" content="Documentation for min-heap-typed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"> <div class="tsd-toolbar-contents container"> <div class="table-cell" id="tsd-search" data-base=".."> <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div> <div class="field"> <div id="tsd-toolbar-links"></div></div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">min-heap-typed</a></div> <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header> <div class="container container-main"> <div class="col-content"> <div class="tsd-page-title"> <ul class="tsd-breadcrumb"> <li><a href="../modules.html">min-heap-typed</a></li> <li><a href="MinHeap.html">MinHeap</a></li></ul> <h1>Class MinHeap&lt;T&gt;</h1></div> <section class="tsd-panel"> <h4>Type Parameters</h4> <ul class="tsd-type-parameter-list"> <li> <h4><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">number</span></h4></li></ul></section> <section class="tsd-panel tsd-hierarchy"> <h4>Hierarchy</h4> <ul class="tsd-hierarchy"> <li><span class="tsd-signature-type ">Heap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span> <ul class="tsd-hierarchy"> <li><span class="target">MinHeap</span></li></ul></li></ul></section><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/min-heap.d.ts:15</li></ul></aside> <section class="tsd-panel-group tsd-index-group"> <section class="tsd-panel tsd-index-panel"> <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"> <h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-chevronSmall"></use></svg> Index</h5></summary> <div class="tsd-accordion-details"> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Constructors</h3> <div class="tsd-index-list"><a href="MinHeap.html#constructor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Properties</h3> <div class="tsd-index-list"><a href="MinHeap.html#_pq" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_pq</span></a> <a href="MinHeap.html#_priorityExtractor" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_priority<wbr/>Extractor</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Accessors</h3> <div class="tsd-index-list"><a href="MinHeap.html#pq" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>pq</span></a> <a href="MinHeap.html#priorityExtractor" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>priority<wbr/>Extractor</span></a> <a href="MinHeap.html#size" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Methods</h3> <div class="tsd-index-list"><a href="MinHeap.html#add" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a> <a href="MinHeap.html#clear" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a> <a href="MinHeap.html#has" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a> <a href="MinHeap.html#isEmpty" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a> <a href="MinHeap.html#peek" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>peek</span></a> <a href="MinHeap.html#peekLast" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>peek<wbr/>Last</span></a> <a href="MinHeap.html#poll" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>poll</span></a> <a href="MinHeap.html#sort" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sort</span></a> <a href="MinHeap.html#toArray" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a> </div></section></div></details></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-is-external"><a id="constructor" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="constructor.new_MinHeap"><span class="tsd-kind-constructor-signature">new <wbr/>Min<wbr/>Heap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="MinHeap.html" class="tsd-signature-type tsd-kind-class">MinHeap</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_MinHeap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The constructor initializes a PriorityQueue with a comparator function that compares the priority of two HeapItem objects.</p> </div> <section class="tsd-panel"> <h4>Type Parameters</h4> <ul class="tsd-type-parameter-list"> <li> <h4><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">number</span></h4></li></ul></section> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">HeapOptions</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>options</code> parameter is an optional object that can be passed to the constructor. It is of type <code>HeapOptions&lt;T&gt;</code>, which is a generic type that represents the options for the heap.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <a href="MinHeap.html" class="tsd-signature-type tsd-kind-class">MinHeap</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Overrides Heap&lt;T&gt;.constructor</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/min-heap.d.ts:23</li></ul></aside></li></ul></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-is-protected tsd-is-external"><a id="_pq" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_pq</span><a href="#_pq" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <div class="tsd-signature"><span class="tsd-kind-property">_pq</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">PriorityQueue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"> <p>Overrides Heap._pq</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/min-heap.d.ts:16</li></ul></aside></section> <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited tsd-is-external"><a id="_priorityExtractor" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_priority<wbr/>Extractor</span><a href="#_priorityExtractor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <div class="tsd-signature"><span class="tsd-kind-property">_priority<wbr/>Extractor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></div> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature" id="_priorityExtractor.__type.__type-1"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></div><aside class="tsd-sources"> <p>Inherited from Heap._priorityExtractor</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:35</li></ul></aside></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Accessors</h2> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pq" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>pq</span><a href="#pq" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature" id="pq.pq-1"><span class="tsd-signature-symbol">get</span> pq<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">PriorityQueue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">PriorityQueue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.pq</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:34</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="priorityExtractor" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>priority<wbr/>Extractor</span><a href="#priorityExtractor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature" id="priorityExtractor.priorityExtractor-1"><span class="tsd-signature-symbol">get</span> priorityExtractor<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature" id="priorityExtractor.priorityExtractor-1.__type-2.__type-3"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul><aside class="tsd-sources"> <p>Inherited from Heap.priorityExtractor</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:36</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="size" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>size</span><a href="#size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature" id="size.size-1"><span class="tsd-signature-symbol">get</span> size<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function returns the size of a priority queue.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The size of the priority queue.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Inherited from Heap.size</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:41</li></ul></aside></li></ul></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="add" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">priority</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Heap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>add</code> function adds an val to a priority queue with an optional priority value.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">priority</span>: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>priority</code> parameter is an optional number that represents the priority of the val being added to the heap. If the <code>val</code> parameter is a number, then the <code>priority</code> parameter is set to the value of <code>val</code>. If the <code>val</code> parameter is not a number, then the</p> </div> <div class="tsd-comment tsd-typography"></div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to add to the heap. It can be of any type.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Heap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The <code>add</code> method returns the instance of the <code>Heap</code> class.</p> <div class="tsd-comment tsd-typography"> <h4>Throws</h4><p>if priority is not a valid number</p> </div><aside class="tsd-sources"> <p>Inherited from Heap.add</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:63</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="clear" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="clear.clear-1"><span class="tsd-kind-call-signature">clear</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The clear function clears the priority queue.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Inherited from Heap.clear</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:82</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="has" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>has</span><a href="#has" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="has.has-1"><span class="tsd-kind-call-signature">has</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#has.has-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function checks if a given node or value exists in the priority queue.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> can be of type <code>T</code> or <code>HeapItem&lt;T&gt;</code>.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Inherited from Heap.has</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:72</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isEmpty" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>is<wbr/>Empty</span><a href="#isEmpty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="isEmpty.isEmpty-1"><span class="tsd-kind-call-signature">is<wbr/>Empty</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEmpty.isEmpty-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function checks if a priority queue is empty.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the size of the priority queue is less than 1.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Inherited from Heap.isEmpty</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:46</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="peek" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">undefined</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peek</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:47</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="peek.peek-2"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peek.peek-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">false</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peek</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:48</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="peek.peek-3"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#peek.peek-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">true</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peek</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:49</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="peekLast" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>peek<wbr/>Last</span><a href="#peekLast" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="peekLast.peekLast-1"><span class="tsd-kind-call-signature">peek<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peekLast.peekLast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">undefined</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peekLast</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:50</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="peekLast.peekLast-2"><span class="tsd-kind-call-signature">peek<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peekLast.peekLast-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">false</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peekLast</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:51</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="peekLast.peekLast-3"><span class="tsd-kind-call-signature">peek<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#peekLast.peekLast-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">true</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.peekLast</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:52</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="poll" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>poll</span><a href="#poll" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="poll.poll-1"><span class="tsd-kind-call-signature">poll</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#poll.poll-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">undefined</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.poll</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:64</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="poll.poll-2"><span class="tsd-kind-call-signature">poll</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#poll.poll-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">false</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.poll</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:65</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="poll.poll-3"><span class="tsd-kind-call-signature">poll</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#poll.poll-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">true</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.poll</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:66</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="sort" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>sort</span><a href="#sort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="sort.sort-1"><span class="tsd-kind-call-signature">sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#sort.sort-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">undefined</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.sort</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:76</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="sort.sort-2"><span class="tsd-kind-call-signature">sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#sort.sort-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">false</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.sort</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:77</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="sort.sort-3"><span class="tsd-kind-call-signature">sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#sort.sort-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">true</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.sort</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:78</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toArray" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>to<wbr/>Array</span><a href="#toArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="toArray.toArray-1"><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#toArray.toArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">undefined</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.toArray</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:73</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="toArray.toArray-2"><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#toArray.toArray-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">false</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.toArray</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:74</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="toArray.toArray-3"><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">isItem</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#toArray.toArray-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">isItem</span>: <span class="tsd-signature-type">true</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">HeapItem</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Inherited from Heap.toArray</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/heap/heap.d.ts:75</li></ul></aside></li></ul></section></section></div> <div class="col-sidebar"> <div class="page-menu"> <div class="tsd-navigation settings"> <details class="tsd-index-accordion"><summary class="tsd-accordion-summary"> <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary> <div class="tsd-accordion-details"> <div class="tsd-filter-visibility"> <h4 class="uppercase">Member Visibility</h4><form> <ul id="tsd-filter-options"> <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><use href="#icon-checkbox"></use></svg><span>Protected</span></label></li> <li class="tsd-fil