Commit | Line | Data |
---|---|---|
67c6a853 | 1 | <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PriorityQueue | poolifier - v4.0.9</title><meta name="description" content="Documentation for poolifier"/><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/icons.js" id="tsd-icons-script"></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";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</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="../assets/icons.svg#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">poolifier - v4.0.9</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="../assets/icons.svg#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="../index.html">poolifier</a></li><li><a href="PriorityQueue.html">PriorityQueue</a></li></ul><h1>Class PriorityQueue<T><code class="tsd-tag ts-flagInternal">Internal</code> </h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Priority queue.</p> |
50b4c8bb | 2 | </div><div class="tsd-comment tsd-typography"></div></section> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span><div class="tsd-comment tsd-typography"><p>Type of priority queue data.</p> |
67c6a853 | 3 | </div><div class="tsd-comment tsd-typography"></div></li></ul></section> <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L20">src/priority-queue.ts:20</a></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="../assets/icons.svg#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="PriorityQueue.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a> |
50b4c8bb DB |
4 | </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="PriorityQueue.html#k" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>k</span></a> |
5 | <a href="PriorityQueue.html#maxSize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Size</span></a> | |
6 | <a href="PriorityQueue.html#nodeArray" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>node<wbr/>Array</span></a> | |
7 | <a href="PriorityQueue.html#size" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>size</span></a> | |
f30cddb8 | 8 | </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="PriorityQueue.html#buckets" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>buckets</span></a> |
50b4c8bb DB |
9 | </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="PriorityQueue.html#_iterator_" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[iterator]</span></a> |
10 | <a href="PriorityQueue.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clear</span></a> | |
0956e79c | 11 | <a href="PriorityQueue.html#decrementSize" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>decrement<wbr/>Size</span></a> |
50b4c8bb DB |
12 | <a href="PriorityQueue.html#dequeue" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dequeue</span></a> |
13 | <a href="PriorityQueue.html#enqueue" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enqueue</span></a> | |
14 | <a href="PriorityQueue.html#incrementSize" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>increment<wbr/>Size</span></a> | |
15 | <a href="PriorityQueue.html#peekFirst" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>peek<wbr/>First</span></a> | |
16 | <a href="PriorityQueue.html#peekLast" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>peek<wbr/>Last</span></a> | |
17 | </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><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="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_PriorityQueue" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Priority<wbr/>Queue</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">k</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PriorityQueue.html" class="tsd-signature-type tsd-kind-class">PriorityQueue</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">></span><a href="#constructor.new_PriorityQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a priority queue.</p> | |
18 | </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="constructor.new_PriorityQueue.T-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">k</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = Infinity</span></span><div class="tsd-comment tsd-typography"><p>Prioritized bucket size.</p> | |
19 | </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="PriorityQueue.html" class="tsd-signature-type tsd-kind-class">PriorityQueue</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-4">Infinity</span> | |
20 | </code><button>Copy</button></pre> | |
67c6a853 DB |
21 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L41">src/priority-queue.ts:41</a></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-private"><a id="k" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>k</span><a href="#k" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">k</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Prioritized bucket size.</p> |
22 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L23">src/priority-queue.ts:23</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="maxSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>max<wbr/>Size</span><a href="#maxSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">max<wbr/>Size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The maximum size of the priority queue.</p> | |
23 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L27">src/priority-queue.ts:27</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-private"><a id="nodeArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>node<wbr/>Array</span><a href="#nodeArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">node<wbr/>Array</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/PriorityQueueNode.html" class="tsd-signature-type tsd-kind-interface">PriorityQueueNode</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L21">src/priority-queue.ts:21</a></li></ul></aside></section><section class="tsd-panel tsd-member"><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="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The size of the priority queue.</p> | |
24 | </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L25">src/priority-queue.ts:25</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="buckets" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>buckets</span><a href="#buckets" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature" id="buckets.buckets-1"><span class="tsd-signature-keyword">get</span> buckets<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 number of filled prioritized buckets.</p> | |
25 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L32">src/priority-queue.ts:32</a></li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="_iterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[iterator]</span><a href="#_iterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="_iterator_._iterator_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[iterator]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span><a href="#_iterator_._iterator_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an iterator for the priority queue.</p> | |
50b4c8bb DB |
26 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></h4><p>An iterator for the priority queue.</p> |
27 | <div class="tsd-comment tsd-typography"><h4>See</h4><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols</a></p> | |
67c6a853 DB |
28 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L129">src/priority-queue.ts:129</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="clear.clear-1" class="tsd-anchor"></a><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="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clears the priority queue.</p> |
29 | </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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L117">src/priority-queue.ts:117</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-private"><a id="decrementSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>decrement<wbr/>Size</span><a href="#decrementSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-private"><li class="tsd-signature tsd-anchor-link"><a id="decrementSize.decrementSize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">decrement<wbr/>Size</span><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><a href="#decrementSize.decrementSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Decrements the size of the priority queue.</p> | |
0956e79c | 30 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The new size of the priority queue.</p> |
67c6a853 | 31 | <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L167">src/priority-queue.ts:167</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="dequeue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dequeue</span><a href="#dequeue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="dequeue.dequeue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dequeue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">bucket</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><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><a href="#dequeue.dequeue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Dequeue data from the priority queue.</p> |
50b4c8bb DB |
32 | </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">bucket</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>The prioritized bucket to dequeue from.</p> |
33 | </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a></h4><p>The dequeued data or <code>undefined</code> if the priority queue is empty.</p> | |
34 | <div class="tsd-comment tsd-typography"><h4>Default Value</h4><pre><code class="language-ts"><span class="hl-1">0</span> | |
35 | </code><button>Copy</button></pre> | |
67c6a853 | 36 | </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L82">src/priority-queue.ts:82</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="enqueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>enqueue</span><a href="#enqueue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="enqueue.enqueue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">enqueue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">priority</span><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><a href="#enqueue.enqueue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Enqueue data into the priority queue.</p> |
50b4c8bb DB |
37 | </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a></span><div class="tsd-comment tsd-typography"><p>Data to enqueue.</p> |
38 | </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">priority</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Priority of the data. Lower values have higher priority.</p> | |
39 | </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The new size of the priority queue.</p> | |
67c6a853 | 40 | <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L59">src/priority-queue.ts:59</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-private"><a id="incrementSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>increment<wbr/>Size</span><a href="#incrementSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-private"><li class="tsd-signature tsd-anchor-link"><a id="incrementSize.incrementSize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">increment<wbr/>Size</span><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><a href="#incrementSize.incrementSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Increments the size of the priority queue.</p> |
50b4c8bb | 41 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The new size of the priority queue.</p> |
67c6a853 | 42 | <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L154">src/priority-queue.ts:154</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="peekFirst" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>peek<wbr/>First</span><a href="#peekFirst" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="peekFirst.peekFirst-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">peek<wbr/>First</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><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><a href="#peekFirst.peekFirst-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Peeks at the first data.</p> |
50b4c8bb | 43 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a></h4><p>The first data or <code>undefined</code> if the priority queue is empty.</p> |
67c6a853 | 44 | <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L102">src/priority-queue.ts:102</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="peekLast.peekLast-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">peek<wbr/>Last</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><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a><a href="#peekLast.peekLast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Peeks at the last data.</p> |
50b4c8bb | 45 | </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="PriorityQueue.html#constructor.new_PriorityQueue.T-1">T</a></h4><p>The last data or <code>undefined</code> if the priority queue is empty.</p> |
67c6a853 | 46 | <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ea2c5b8b3cee6a2d3915367d734c51628ef40551/src/priority-queue.ts#L110">src/priority-queue.ts:110</a></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="../assets/icons.svg#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"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a><a href="#k" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>k</span></a><a href="#maxSize" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Size</span></a><a href="#nodeArray" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>node<wbr/>Array</span></a><a href="#size" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>size</span></a><a href="#buckets" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>buckets</span></a><a href="#_iterator_" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[iterator]</span></a><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clear</span></a><a href="#decrementSize" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>decrement<wbr/>Size</span></a><a href="#dequeue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dequeue</span></a><a href="#enqueue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enqueue</span></a><a href="#incrementSize" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>increment<wbr/>Size</span></a><a href="#peekFirst" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>peek<wbr/>First</span></a><a href="#peekLast" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>peek<wbr/>Last</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>poolifier - v4.0.9</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |