Heap instance constructor.
-Optional comparison function, defaults to Heap.minComparator
Optional comparison function, defaults to Heap.minComparator
Alias of __type
-peek
-Alias of __type
-add
-Alias of __type
-pop
-Alias of __type
-clear
-Length of the heap. Aliases: size.
-size
-setLimit
-Set length limit of the heap. Same as using setLimit.
-Limit, defaults to 0 (no limit). Negative, Infinity, or NaN values set the limit to 0.
-If the heap is longer than the limit, the needed amount of leafs are removed.
- -setLimit
-Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Heap
+Heap instance constructor.
+Optional comparison function, defaults to Heap.minComparator
Optional comparison function, defaults to Heap.minComparator
Alias of peek
+Alias of add
+Alias of pop
+Alias of clear
+Remove all of the elements from this heap.
+Length of the heap. Aliases: size.
+Set length limit of the heap. Same as using setLimit.
+Limit, defaults to 0 (no limit). Negative, Infinity, or NaN values set the limit to 0.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: init + push.
-Number of elements.
-Array of length <= N.
- -Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Number of elements.
+Array of length <= N.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: heap.
-Number of elements.
-Array of length <= N.
- -Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Number of elements.
+Array of length <= N.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: push.
-Number of elements.
-Array of length <= N.
- -Element to be added
-true
- -Adds an array of elements to the heap. +
Element to be added
+true
+Returns the comparison function.
-Returns true if this queue contains the specified element.
-Element to be found
-Optional comparison function, receives (element, needle)
-Get the index of the first occurrence of the element in the heap (using the comparator).
-Element to be found
-Optional comparison function, receives (element, needle)
-Index or -1 if not found
- -Get the indexes of the every occurrence of the element in the heap (using the comparator).
-Element to be found
-Optional comparison function, receives (element, needle)
-Array of indexes or empty array if not found
- -Get the leafs of the tree (no children nodes). -See also: getChildrenOf and bottom.
-Elements to be added
+true
+Returns the comparison function.
+Get the leafs of the tree (no children nodes). +See also: getChildrenOf and bottom.
+Top node. Aliases: element. +
Top node
- -top
-Extract the top node (root). Aliases: poll.
-Extracted top node, undefined if empty
- -Remove the first occurrence of an element from the heap.
-Optional
o: TElement to be found
-Optional equality function, receives (element, needle)
-True if the heap was modified
- -Set length limit of the heap. +
Top node
+Set length limit of the heap. Same as assigning to limit but returns NaN if the value was invalid.
-Limit. Negative, Infinity, or NaN values set the limit to 0.
-The limit or NaN if the value was negative, or NaN.
- -limit
-Static
defaultStatic
getStatic
getStatic
getStatic
heapbottomReturn the n
least valuable elements of a heap-like Array
Array, should be an array-heap
-Max number of elements
-Optional
compare: Comparator<N>Optional compare function
-Elements
- -Static
heapifyConverts an array into an array-heap, in place
-Array to be modified
-Optional
compare: Comparator<N>Optional compare function
-For convenience, it returns a Heap instance
- -Static
heappopExtract the peek of an array-heap
-Array to be modified, should be a heap
-Optional
compare: Comparator<N>Optional compare function
-Returns the extracted peek
- -Static
heappushPushes a item into an array-heap
-Array to be modified, should be a heap
-Item to push
-Optional
compare: Comparator<N>Optional compare function
-Static
heappushpopPush followed by pop, faster
-Array to be modified, should be a heap
-Item to push
-Optional
compare: Comparator<N>Optional compare function
-Returns the extracted peek
- -Static
heapreplaceReplace peek with item
-Array to be modified, should be a heap
-Item as replacement
-Optional
compare: Comparator<N>Optional compare function
-Returns the extracted peek
- -Static
heaptopReturn the n
most valuable elements of a heap-like Array
Array, should be an array-heap
-Max number of elements
-Optional
compare: Comparator<N>Optional compare function
-Elements
- -Static
maxStatic
maxStatic
minStatic
minStatic
nlargestReturn the n
most valuable elements of an iterable
Max number of elements
-Optional
compare: Comparator<N>Optional compare function
-Elements
- -Static
nsmallestReturn the n
least valuable elements of an iterable
Max number of elements
-Optional
compare: Comparator<N>Optional compare function
-Elements
- -Static
printPrints a heap.
-Heap to be printed
-Generated using TypeDoc
Limit. Negative, Infinity, or NaN values set the limit to 0.
+The limit or NaN if the value was negative, or NaN.
+Static
defaultStatic
getStatic
getStatic
getStatic
heapbottomReturn the n
least valuable elements of a heap-like Array
Array, should be an array-heap
+Max number of elements
+Optional
compare: Comparator<N>Optional compare function
+Elements
+Static
heapifyStatic
heappopExtract the peek of an array-heap
+Array to be modified, should be a heap
+Optional
compare: Comparator<N>Optional compare function
+Returns the extracted peek
+Static
heappushPushes a item into an array-heap
+Array to be modified, should be a heap
+Item to push
+Optional
compare: Comparator<N>Optional compare function
+Static
heappushpopStatic
heapreplaceStatic
heaptopReturn the n
most valuable elements of a heap-like Array
Array, should be an array-heap
+Max number of elements
+Optional
compare: Comparator<N>Optional compare function
+Elements
+Static
maxStatic
maxStatic
minStatic
minStatic
nlargestReturn the n
most valuable elements of an iterable
Max number of elements
+Optional
compare: Comparator<N>Optional compare function
+Elements
+Static
nsmallestReturn the n
least valuable elements of an iterable
Max number of elements
+Optional
compare: Comparator<N>Optional compare function
+Elements
+Static
printHeap
-Heap instance constructor.
-Optional comparison function, defaults to Heap.minComparator
Optional comparison function, defaults to Heap.minComparator
Alias of peek
-Alias of add
-Alias of pop
-Length of the heap.
-Get length limit of the heap.
-Set length limit of the heap.
-Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Heap
+Heap instance constructor.
+Optional comparison function, defaults to Heap.minComparator
Optional comparison function, defaults to Heap.minComparator
Alias of peek
+Alias of add
+Alias of pop
+Length of the heap.
+Get length limit of the heap.
+Set length limit of the heap.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: init + push.
-Number of elements.
-Array of length <= N.
- -Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Number of elements.
+Array of length <= N.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: heap.
-Number of elements.
-Array of length <= N.
- -Return the top (highest value) N elements of the heap, without corner cases, unsorted +
Number of elements.
+Array of length <= N.
+Return the top (highest value) N elements of the heap, without corner cases, unsorted Implementation: push.
-Number of elements.
-Array of length <= N.
- -Adds an element to the heap. Aliases: offer
.
+
Number of elements.
+Array of length <= N.
+Adds an element to the heap. Aliases: offer
.
Same as: push(element)
Element to be added
-true
- -Adds an array of elements to the heap. +
Element to be added
+true
+Adds an array of elements to the heap. Similar as: push(element, element, ...).
-Elements to be added
-true
- -Returns the comparison function.
-Returns true if this queue contains the specified element.
-Element to be found
-Optional comparison function, receives (element, needle)
-Top node. Aliases: element
.
+
Elements to be added
+true
+Returns the comparison function.
+Returns true if this queue contains the specified element.
+Element to be found
+Optional comparison function, receives (element, needle)
+Top node. Aliases: element
.
Same as: top(1)[0]
Top node
- -Remove an element from the heap.
-Optional
o: TElement to be found
-Optional function to compare
-True if the heap was modified
- -Static
defaultStatic
getStatic
getStatic
getStatic
heapbottomReturn the n
least valuable elements of a heap-like Array
Array, should be an array-heap
-Max number of elements
-Optional
compare: AsyncComparator<N>Optional compare function
-Elements
- -Static
heapifyConverts an array into an array-heap, in place
-Array to be modified
-Optional
compare: AsyncComparator<N>Optional compare function
-For convenience, it returns a Heap instance
- -Static
heappopExtract the peek of an array-heap
-Array to be modified, should be a heap
-Optional
compare: AsyncComparator<N>Optional compare function
-Returns the extracted peek
- -Static
heappushPushes a item into an array-heap
-Array to be modified, should be a heap
-Item to push
-Optional
compare: AsyncComparator<N>Optional compare function
-Static
heappushpopPush followed by pop, faster
-Array to be modified, should be a heap
-Item to push
-Optional
compare: AsyncComparator<N>Optional compare function
-Returns the extracted peek
- -Static
heapreplaceReplace peek with item
-Array to be modified, should be a heap
-Item as replacement
-Optional
compare: AsyncComparator<N>Optional compare function
-Returns the extracted peek
- -Static
heaptopReturn the n
most valuable elements of a heap-like Array
Array, should be an array-heap
-Max number of elements
-Optional
compare: AsyncComparator<N>Optional compare function
-Elements
- -Static
maxStatic
maxStatic
minStatic
minStatic
nlargestReturn the n
most valuable elements of an iterable
Max number of elements
-Optional
compare: AsyncComparator<N>Optional compare function
-Elements
- -Static
nsmallestReturn the n
least valuable elements of an iterable
Max number of elements
-Optional
compare: AsyncComparator<N>Optional compare function
-Elements
- -Static
printPrints a heap.
-Heap to be printed
-Generated using TypeDoc
Top node
+Remove an element from the heap.
+Optional
o: TElement to be found
+Optional function to compare
+True if the heap was modified
+Static
defaultStatic
getStatic
getStatic
getStatic
heapbottomReturn the n
least valuable elements of a heap-like Array
Array, should be an array-heap
+Max number of elements
+Optional
compare: AsyncComparator<N>Optional compare function
+Elements
+Static
heapifyConverts an array into an array-heap, in place
+Array to be modified
+Optional
compare: AsyncComparator<N>Optional compare function
+For convenience, it returns a Heap instance
+Static
heappopExtract the peek of an array-heap
+Array to be modified, should be a heap
+Optional
compare: AsyncComparator<N>Optional compare function
+Returns the extracted peek
+Static
heappushPushes a item into an array-heap
+Array to be modified, should be a heap
+Item to push
+Optional
compare: AsyncComparator<N>Optional compare function
+Static
heappushpopPush followed by pop, faster
+Array to be modified, should be a heap
+Item to push
+Optional
compare: AsyncComparator<N>Optional compare function
+Returns the extracted peek
+Static
heapreplaceReplace peek with item
+Array to be modified, should be a heap
+Item as replacement
+Optional
compare: AsyncComparator<N>Optional compare function
+Returns the extracted peek
+Static
heaptopReturn the n
most valuable elements of a heap-like Array
Array, should be an array-heap
+Max number of elements
+Optional
compare: AsyncComparator<N>Optional compare function
+Elements
+Static
maxStatic
maxStatic
minStatic
minStatic
nlargestReturn the n
most valuable elements of an iterable
Max number of elements
+Optional
compare: AsyncComparator<N>Optional compare function
+Elements
+Static
nsmallestReturn the n
least valuable elements of an iterable
Max number of elements
+Optional
compare: AsyncComparator<N>Optional compare function
+Elements
+Static
printGenerated using TypeDoc
Efficient Binary heap (priority queue, binary tree) data structure for JavaScript / TypeScript.
Now with support for async comparators with the new HeapAsync
class!
Includes JavaScript methods, Python's heapq module methods, and Java's PriorityQueue methods.
+Includes JavaScript methods, Python's heapq module methods, and Java's PriorityQueue methods.
Easy to use, known interfaces, tested, and well-documented JavaScript binary heap library.
Instances are integer min heap
by default.
It depends on your usage, but for some scenarios, it is much faster:
+It depends on your usage, but for some scenarios, it is much faster:
heap vs array: push + pop/unshift 50
heap x 72,130 ops/sec ±0.50% (93 runs sampled)
array x 121 ops/sec ±78.09% (5 runs sampled)
heap vs array: push + peek 20
heap x 622,332 ops/sec ±27.93% (63 runs sampled)
array x 207 ops/sec ±78.18% (5 runs sampled)
heap vs array: push + top(1) of 100
heap x 124,835 ops/sec ±40.37% (61 runs sampled)
array x 123 ops/sec ±78.49% (5 runs sampled)
heap vs array: push + top(50) of 100
heap x 59,210 ops/sec ±17.66% (82 runs sampled)
array x 125 ops/sec ±78.79% (5 runs sampled)
-limit
property to support negative, Infinity, and NaN values. They will be set as 0
and the heap will not be limited.setLimit
method to set the limit of the heap. It returns NaN
if the limit is negative, or NaN. This method is useful to check if the limit was set as expected.indexOf
method to find the first index of an element in the heap.indexOfEvery
method to find all indexes of an element in the heap.remove
method to use the indexOf
method.contains
method to use the indexOf
method.HeapAsync
class, with async methods and supporting async comparators. It is a drop-in replacement for the Heap
class with Promises..iterator()
method to follow Java's PriorityQueue implementation:
-+2.2
+
-- Fixes
.iterator()
method to follow Java's PriorityQueue implementation: + +The Iterator provided in method iterator() is not guaranteed to traverse the elements of the priority queue in any particular order.
Notice that using the heap directly as an iterator will consume the heap, as Python's
-heapq
implementation does.2.1
+
Notice that using the heap directly as an iterator will consume the heap, as Python's
+heapq
implementation does.2.1
-
- Adds
Heap.nlargest
as inheapq
.- Adds
Heap.nsmallest
as inheapq
.- Sanitizes
top
/bottom
input to force an integer.- Linted with Eslint.
2.0
The main breaking change is that now
+top(N)
does NOT sort the output, because sorting should not be part of the spec for a priority queue. The output is the top N elements, and they will be partially ordered with the peek at index0
by definition.2.0
The main breaking change is that now
top(N)
does NOT sort the output, because sorting should not be part of the spec for a priority queue. The output is the top N elements, and they will be partially ordered with the peek at index0
by definition.
top(N)
is unordered, only the first element is guaranteed to be the top priority element.- Fixes custom heap issue #31.
@@ -62,42 +50,52 @@heap-js
top(N)
algorithms.Iterator
interface and iterator()
method.A heap where the smallest element is always at the top. It is the default heap.
-import { Heap } from 'heap-js';
// Min Heap by default
const minHeap = new Heap();
// Initialize the heap with an array
minHeap.init([5, 18, 1]);
// Push a new value
minHeap.push(2);
console.log(minHeap.peek()); //> 1
console.log(minHeap.pop()); //> 1
console.log(minHeap.peek()); //> 2
-
-A heap where the largest element is always at the top.
-import { Heap } from 'heap-js';
// Max Heap
const maxHeap = new Heap(Heap.maxComparator);
// Initialize the heap with an array
maxHeap.init([3, 4, 1, 12, 8]);
// Push a new value
maxHeap.push(2);
console.log(maxHeap.peek()); //> 12
console.log(maxHeap.pop()); //> 12
console.log(maxHeap.peek()); //> 8
-
-A heap where the most important element is always at the top, but the elements are objects with a priority
property.
import { Heap } from 'heap-js';
const customPriorityComparator = (a, b) => a.priority - b.priority;
// Custom Heap
const customHeap = new Heap(customPriorityComparator);
// Initialize the heap with an array
customHeap.init([{ priority: 5 }, { priority: 18 }, { priority: 1 }]);
// Push a new value
customHeap.push({ priority: 2 });
console.log(customHeap.peek()); //> { priority: 1 }
console.log(customHeap.pop()); //> { priority: 1 }
console.log(customHeap.peek()); //> { priority: 2 }
-
-A heap where the most important element is always at the top, the elements are objects with a priority
property, and the comparator function is asynchronous. Implements the same interface as Heap
, but almost all methods return a Promise
.
import { HeapAsync } from 'heap-js';
const customPriorityComparator = (a, b) => Promise.resolve(a.priority - b.priority);
// Custom HeapAsync
const customHeap = new HeapAsync(customPriorityComparator);
// Initialize the heap with an array
await customHeap.init([{ priority: 5 }, { priority: 18 }, { priority: 1 }]);
// Push a new value
await customHeap.push({ priority: 2 });
console.log(customHeap.peek()); //> { priority: 1 }
console.log(await customHeap.pop()); //> { priority: 1 }
console.log(await customHeap.peek()); //> { priority: 2 }
-
-Iterates over the heap consuming it, and guarantees to traverse the elements of the heap in the order of priority. Useful.
-const { Heap } = require('heap-js');
// Get all tasks from the database
const tasks = db.collection.find().toArray();
// The most important task has the lowest priority value
const customPriorityComparator = (a, b) => a.priority - b.priority;
// Create the priority queue
const priorityQueue = new Heap(customPriorityComparator);
// Initialize the priority queue with the tasks
priorityQueue.init(tasks);
// Iterator that will consume the heap while traversing it in the order of priority
for (const task of priorityQueue) {
console.log(task);
}
-
-Iterates over the heap without consuming it, but does not guarantee to traverse the elements of the heap in any particular order. Barely useful.
-const { Heap } = require('heap-js');
// Get all tasks from the database
const tasks = db.collection.find().toArray();
// The most important task has the lowest priority value
const customPriorityComparator = (a, b) => a.priority - b.priority;
const priorityQueue = new Heap(customPriorityComparator);
// Initialize the priority queue with the tasks
priorityQueue.init(tasks);
// Iterator, the Java way, that will not consume the heap BUT does not guarantee to traverse the elements of the heap in any particular order. Barely useful.
for (const task of priorityQueue.iterator()) {
console.log(task);
}
-
-import { Heap } from 'heap-js';
const numbers = [2, 3, 7, 5];
// Changes the array elements order into a heap in-place
Heap.heapify(numbers);
console.log(numbers); //> [ 2, 3, 5, 7 ]
// Pushes a new value to the heap
Heap.heappush(numbers, 1);
console.log(numbers); //> [ 1, 2, 5, 7, 3 ]
-
-yarn add heap-js # if you use yarn
npm install --save heap-js # if you use npm
-
-new Heap([comparator]);
-
-new HeapAsync([asyncComparator]);
-
-A heap where the smallest element is always at the top. It is the default heap.
+import { Heap } from 'heap-js';
// Min Heap by default
const minHeap = new Heap();
// Initialize the heap with an array
minHeap.init([5, 18, 1]);
// Push a new value
minHeap.push(2);
console.log(minHeap.peek()); //> 1
console.log(minHeap.pop()); //> 1
console.log(minHeap.peek()); //> 2
+
+
+A heap where the largest element is always at the top.
+import { Heap } from 'heap-js';
// Max Heap
const maxHeap = new Heap(Heap.maxComparator);
// Initialize the heap with an array
maxHeap.init([3, 4, 1, 12, 8]);
// Push a new value
maxHeap.push(2);
console.log(maxHeap.peek()); //> 12
console.log(maxHeap.pop()); //> 12
console.log(maxHeap.peek()); //> 8
+
+
+A heap where the most important element is always at the top, but the elements are objects with a priority
property.
import { Heap } from 'heap-js';
const customPriorityComparator = (a, b) => a.priority - b.priority;
// Custom Heap
const customHeap = new Heap(customPriorityComparator);
// Initialize the heap with an array
customHeap.init([{ priority: 5 }, { priority: 18 }, { priority: 1 }]);
// Push a new value
customHeap.push({ priority: 2 });
console.log(customHeap.peek()); //> { priority: 1 }
console.log(customHeap.pop()); //> { priority: 1 }
console.log(customHeap.peek()); //> { priority: 2 }
+
+
+A heap where the most important element is always at the top, the elements are objects with a priority
property, and the comparator function is asynchronous. Implements the same interface as Heap
, but almost all methods return a Promise
.
import { HeapAsync } from 'heap-js';
const customPriorityComparator = (a, b) => Promise.resolve(a.priority - b.priority);
// Custom HeapAsync
const customHeap = new HeapAsync(customPriorityComparator);
// Initialize the heap with an array
await customHeap.init([{ priority: 5 }, { priority: 18 }, { priority: 1 }]);
// Push a new value
await customHeap.push({ priority: 2 });
console.log(customHeap.peek()); //> { priority: 1 }
console.log(await customHeap.pop()); //> { priority: 1 }
console.log(await customHeap.peek()); //> { priority: 2 }
+
+
+Iterates over the heap consuming it, and guarantees to traverse the elements of the heap in the order of priority. Useful.
+const { Heap } = require('heap-js');
// Get all tasks from the database
const tasks = db.collection.find().toArray();
// The most important task has the lowest priority value
const customPriorityComparator = (a, b) => a.priority - b.priority;
// Create the priority queue
const priorityQueue = new Heap(customPriorityComparator);
// Initialize the priority queue with the tasks
priorityQueue.init(tasks);
// Iterator that will consume the heap while traversing it in the order of priority
for (const task of priorityQueue) {
console.log(task);
}
+
+
+Iterates over the heap without consuming it, but does not guarantee to traverse the elements of the heap in any particular order. Barely useful.
+const { Heap } = require('heap-js');
// Get all tasks from the database
const tasks = db.collection.find().toArray();
// The most important task has the lowest priority value
const customPriorityComparator = (a, b) => a.priority - b.priority;
const priorityQueue = new Heap(customPriorityComparator);
// Initialize the priority queue with the tasks
priorityQueue.init(tasks);
// Iterator, the Java way, that will not consume the heap BUT does not guarantee to traverse the elements of the heap in any particular order. Barely useful.
for (const task of priorityQueue.iterator()) {
console.log(task);
}
+
+
+import { Heap } from 'heap-js';
const numbers = [2, 3, 7, 5];
// Changes the array elements order into a heap in-place
Heap.heapify(numbers);
console.log(numbers); //> [ 2, 3, 5, 7 ]
// Pushes a new value to the heap
Heap.heappush(numbers, 1);
console.log(numbers); //> [ 1, 2, 5, 7, 3 ]
+
+
+yarn add heap-js # if you use yarn
npm install --save heap-js # if you use npm
+
+
+new Heap([comparator]);
+
+
+new HeapAsync([asyncComparator]);
+
+
+Heap.minComparator
: Uses less-than operator to compare elements. It is the default comparator.Heap.maxComparator
: Uses greater-than operator to compare elements.Heap.minComparatorNumber
: Uses subtraction a - b
to compare elements.Heap.maxComparatorNumber
: Uses subtraction b - a
to compare elements.indexOf(element, fn?)
returns the internal index of the first occurrence of the element in the heap.indexOfEvery(element, fn?)
returns an array with the internal indexes of all occurrences of the element in the heap.PriorityQueue
interfacecontains(element, fn?)
element()
alias of peek()
isEmpty()
iterator()
returns the same as toArray()
because it is iterable and follows Java's implementation. Barely useful. Use for (const value of heap)
instead.iterator()
returns the same as toArray()
because it is iterable and follows Java's implementation. Barely useful. Use for (const value of heap)
instead.offer(element)
alias of add(element)
peek()
poll()
alias of pop()
equals
retainAll
heapq
interfaceheapq
interfaceHeap.heapify(array, comparator?)
that converts an array to an array-heap.Heap.heappop(heapArray, comparator?)
that takes the peek of the array-heap.Heap.heappush(heapArray, item, comparator?)
that appends elements to the array-heap.merge(...iterables, comparator?)
https://ignlg.github.io/heap-js/
-Development of Heap.js happens in the open on GitHub, and I am grateful to the community for contributing bug fixes and improvements.
-yarn
-
-npm run test
-
-npm run benchmarks
-
-Heap.js is BSD licensed.
-Generated using TypeDoc
https://ignlg.github.io/heap-js/
+We are looking for sponsors to help us maintain and improve Heap.js. If you're interested in supporting this project, please get in touch with us.
+Would you like to contribute to Heap.js? Feel free to submit a pull request, open an issue, or reach out to the maintainers. We welcome your feedback and ideas!
+yarn
+
+
+npm run test
+
+
+npm run benchmarks
+
+
+Heap.js is BSD 3-Clause Licensed.
+ diff --git a/docs/media/LICENSE b/docs/media/LICENSE new file mode 100644 index 0000000..d843642 --- /dev/null +++ b/docs/media/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2017, Ignacio Lago +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/docs/media/heap-js.png b/docs/media/heap-js.png new file mode 100644 index 0000000..a4aa5fc Binary files /dev/null and b/docs/media/heap-js.png differ diff --git a/docs/modules.html b/docs/modules.html index ddaf8ba..cdb521a 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,77 +1 @@ -Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Heap
-