Comparing version 0.1.21 to 0.1.22
@@ -11,3 +11,3 @@ "use strict"; | ||
Graph.prototype.create = function (vectors, nodes) { | ||
this._adjList = new Array(nodes).fill(0).map(function (list) { return []; }); | ||
this._adjList = new Array(nodes).fill(0).map(function () { return []; }); | ||
for (var i = 0; i < vectors.length; i++) { | ||
@@ -14,0 +14,0 @@ var vector = vectors[i]; |
@@ -7,2 +7,3 @@ import { PriorityQueue } from './priorityQueue'; | ||
import { Graph } from './graph'; | ||
export { PriorityQueue, BinaryTree, BinaryNode, BST, quickSort, pivot, quickSelect, quickSelectPivot, binarySearch, binarySearchRange, searchRange, Graph, }; | ||
import { Dijkstra } from './dijkstra'; | ||
export { PriorityQueue, BinaryTree, BinaryNode, BST, quickSort, pivot, quickSelect, quickSelectPivot, binarySearch, binarySearchRange, searchRange, Graph, Dijkstra, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Graph = exports.searchRange = exports.binarySearchRange = exports.binarySearch = exports.quickSelectPivot = exports.quickSelect = exports.pivot = exports.quickSort = exports.BST = exports.BinaryNode = exports.BinaryTree = exports.PriorityQueue = void 0; | ||
exports.Dijkstra = exports.Graph = exports.searchRange = exports.binarySearchRange = exports.binarySearch = exports.quickSelectPivot = exports.quickSelect = exports.pivot = exports.quickSort = exports.BST = exports.BinaryNode = exports.BinaryTree = exports.PriorityQueue = void 0; | ||
var priorityQueue_1 = require("./priorityQueue"); | ||
@@ -22,1 +22,3 @@ Object.defineProperty(exports, "PriorityQueue", { enumerable: true, get: function () { return priorityQueue_1.PriorityQueue; } }); | ||
Object.defineProperty(exports, "Graph", { enumerable: true, get: function () { return graph_1.Graph; } }); | ||
var dijkstra_1 = require("./dijkstra"); | ||
Object.defineProperty(exports, "Dijkstra", { enumerable: true, get: function () { return dijkstra_1.Dijkstra; } }); |
@@ -1,6 +0,6 @@ | ||
type compareFunc = (a: number, b: number) => boolean; | ||
export declare class PriorityQueue { | ||
type CompareFunc = (a: number, b: number) => boolean; | ||
declare class PriorityQueue { | ||
private _heap; | ||
private _comparator; | ||
constructor(comparator: compareFunc); | ||
constructor(comparator: CompareFunc); | ||
isEmpty(): boolean; | ||
@@ -20,2 +20,2 @@ size(): number; | ||
} | ||
export {}; | ||
export { PriorityQueue, CompareFunc }; |
{ | ||
"name": "flex-algo", | ||
"version": "0.1.21", | ||
"version": "0.1.22", | ||
"description": "\"SDK for commonly used data structure and algorithms\"", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
31869
18
857