@thi.ng/heaps
Advanced tools
Comparing version 1.0.10 to 1.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/heaps@1.0.10...@thi.ng/heaps@1.1.0) (2019-07-07) | ||
### Features | ||
* **heaps:** enable TS strict compiler flags (refactor) ([86b9c9e](https://github.com/thi-ng/umbrella/commit/86b9c9e)) | ||
## [1.0.10](https://github.com/thi-ng/umbrella/compare/@thi.ng/heaps@1.0.9...@thi.ng/heaps@1.0.10) (2019-05-22) | ||
@@ -8,0 +19,0 @@ |
@@ -29,7 +29,7 @@ import { ICopy, IEmpty, IStack } from "@thi.ng/api"; | ||
protected d: number; | ||
constructor(values?: Iterable<T>, opts?: Partial<DHeapOpts<T>>); | ||
copy(): any; | ||
constructor(values?: Iterable<T> | null, opts?: Partial<DHeapOpts<T>>); | ||
copy(): DHeap<T>; | ||
empty(): DHeap<T>; | ||
parent(n: number): T; | ||
children(n: number): T[]; | ||
parent(n: number): T | undefined; | ||
children(n: number): T[] | undefined; | ||
leaves(): T[]; | ||
@@ -36,0 +36,0 @@ heapify(vals?: T[]): void; |
@@ -14,3 +14,3 @@ import { compare } from "@thi.ng/compare"; | ||
constructor(values, opts) { | ||
super(null, Object.assign({ compare }, opts)); | ||
super(undefined, Object.assign({ compare }, opts)); | ||
this.d = (opts && opts.d) || 4; | ||
@@ -17,0 +17,0 @@ this.values = []; |
@@ -24,3 +24,3 @@ import { Comparator, ICopy, IEmpty, ILength, IStack } from "@thi.ng/api"; | ||
compare: Comparator<T>; | ||
constructor(values?: Iterable<T>, opts?: HeapOpts<T>); | ||
constructor(values?: Iterable<T> | null, opts?: HeapOpts<T>); | ||
[Symbol.iterator](): IterableIterator<T>; | ||
@@ -60,4 +60,4 @@ readonly length: number; | ||
min(n?: number): T[]; | ||
parent(n: number): T; | ||
children(n: number): T[]; | ||
parent(n: number): T | undefined; | ||
children(n: number): T[] | undefined; | ||
leaves(): T[]; | ||
@@ -64,0 +64,0 @@ protected percolateUp(i: number, vals?: T[]): void; |
@@ -198,3 +198,3 @@ 'use strict'; | ||
constructor(values, opts) { | ||
super(null, Object.assign({ compare: compare.compare }, opts)); | ||
super(undefined, Object.assign({ compare: compare.compare }, opts)); | ||
this.d = (opts && opts.d) || 4; | ||
@@ -201,0 +201,0 @@ this.values = []; |
@@ -198,3 +198,3 @@ (function (global, factory) { | ||
constructor(values, opts) { | ||
super(null, Object.assign({ compare: compare.compare }, opts)); | ||
super(undefined, Object.assign({ compare: compare.compare }, opts)); | ||
this.d = (opts && opts.d) || 4; | ||
@@ -201,0 +201,0 @@ this.values = []; |
{ | ||
"name": "@thi.ng/heaps", | ||
"version": "1.0.10", | ||
"version": "1.1.0", | ||
"description": "Generic binary heap & d-ary heap implementations with customizable ordering", | ||
@@ -28,11 +28,11 @@ "module": "./index.js", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^11.13.7", | ||
"@types/node": "^12.0.8", | ||
"mocha": "^6.1.4", | ||
"nyc": "^14.0.0", | ||
"typedoc": "^0.14.2", | ||
"typescript": "^3.4.5" | ||
"typescript": "^3.5.2" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.2.0", | ||
"@thi.ng/compare": "^1.0.6" | ||
"@thi.ng/api": "^6.3.0", | ||
"@thi.ng/compare": "^1.0.7" | ||
}, | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
"sideEffects": false, | ||
"gitHead": "5a4226d52724f320fb25656f08addb2825375fee" | ||
"gitHead": "efa9fdd61dd4ad2187cefe0a26df3bf2baade24b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65822
Updated@thi.ng/api@^6.3.0
Updated@thi.ng/compare@^1.0.7