UNPKG

typescript-collections

Version:

A complete, fully tested data structure library written in TypeScript.

37 lines 1.62 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var BSTreeKV_1 = require("./BSTreeKV"); /** * Special-case of the binary search tree in which the search key is equal to the element type. * This definition is suitable when the element type can not be split between what defines its order * and what does not (eg. primitive types as opposed to indexed records). * * The table below shows some use-case examples for both interfaces: * * element type | most suitable interface * ------------------------------------|---------------------------- * number | BSTree<number> * string | BSTree<string> * { order: number, data: string } | BSTreeKV<{order: number}, {order: number, data: string}> * * @see BSTreeKV */ var BSTree = /** @class */ (function (_super) { __extends(BSTree, _super); function BSTree() { return _super !== null && _super.apply(this, arguments) || this; } return BSTree; }(BSTreeKV_1.default)); exports.default = BSTree; //# sourceMappingURL=BSTree.js.map