mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-23 12:54:04 +00:00
[pkg] ready to publish v1.37.0
This commit is contained in:
parent
f05793ee88
commit
af7372ba30
|
@ -8,10 +8,11 @@ All notable changes to this project will be documented in this file.
|
|||
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
||||
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
||||
|
||||
## [v1.36.9](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
|
||||
## [v1.37.0](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
|
||||
|
||||
### Changes
|
||||
|
||||
- [binary-tree, graph] Replace all code that uses Arrays as makeshift Q… [`#18`](https://github.com/zrwusa/data-structure-typed/pull/18)
|
||||
- 1. No need for dfsIterative; integrate it directly into the dfs metho… [`#17`](https://github.com/zrwusa/data-structure-typed/pull/17)
|
||||
- [heap] fibonacci heap implemented. [test] big O estimate. [project] n… [`#15`](https://github.com/zrwusa/data-structure-typed/pull/15)
|
||||
- [rbtree] implemented, but with bugs [`#13`](https://github.com/zrwusa/data-structure-typed/pull/13)
|
||||
|
|
36
package-lock.json
generated
36
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "data-structure-typed",
|
||||
"version": "1.36.9",
|
||||
"version": "1.37.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "data-structure-typed",
|
||||
"version": "1.36.9",
|
||||
"version": "1.37.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/benchmark": "^2.1.3",
|
||||
|
@ -15,17 +15,17 @@
|
|||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"avl-tree-typed": "^1.36.8",
|
||||
"avl-tree-typed": "^1.36.9",
|
||||
"benchmark": "^2.1.4",
|
||||
"binary-tree-typed": "^1.36.8",
|
||||
"bst-typed": "^1.36.8",
|
||||
"binary-tree-typed": "^1.36.9",
|
||||
"bst-typed": "^1.36.9",
|
||||
"dependency-cruiser": "^14.1.0",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"heap-typed": "^1.36.8",
|
||||
"heap-typed": "^1.36.9",
|
||||
"istanbul-badges-readme": "^1.8.5",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.0.3",
|
||||
|
@ -2396,9 +2396,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/avl-tree-typed": {
|
||||
"version": "1.36.8",
|
||||
"resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.36.8.tgz",
|
||||
"integrity": "sha512-cdzKqEFMfCE9D54wqnKvNaFn5RQI4reRcKg1CHPN2a5PicJn6uXcoULGPX9b4TKI35PJNhZ+7Blq4Y+5olsUsw==",
|
||||
"version": "1.36.9",
|
||||
"resolved": "https://registry.npmjs.org/avl-tree-typed/-/avl-tree-typed-1.36.9.tgz",
|
||||
"integrity": "sha512-JCcrzwqotdd62ojLQZR74kTcmlgn+Y0w+Ws2l58ZzStW8dWVZUY/KybRxVJnY1XT50DTYY6RzAf1UFgj52anvw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"data-structure-typed": "^1.36.8"
|
||||
|
@ -2586,9 +2586,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/binary-tree-typed": {
|
||||
"version": "1.36.8",
|
||||
"resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.36.8.tgz",
|
||||
"integrity": "sha512-Brh3DLTcm17ZmJoDNVWG3f6aeD448ANjv5EQi19ZrwPwMddlLRdvEn08lfdheq78lzw3x2rOU7GgFA4W+fbeFw==",
|
||||
"version": "1.36.9",
|
||||
"resolved": "https://registry.npmjs.org/binary-tree-typed/-/binary-tree-typed-1.36.9.tgz",
|
||||
"integrity": "sha512-3YBodVs6gpGkgyY7vhDL+m20G/RyRFnu5Yqgf6xYvabwoChc8Yzv+UrxMqD7CVDt2o/WvvEuC/M7U5GYSNLY2A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"data-structure-typed": "^1.36.8"
|
||||
|
@ -2670,9 +2670,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/bst-typed": {
|
||||
"version": "1.36.8",
|
||||
"resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.36.8.tgz",
|
||||
"integrity": "sha512-bjWACK4u+qXIetBrOcs8GRLucxsshnxcP8FDnPXzDr2sl84aVITvt+yQ4hpuft7t3C3Z2X2PtTp2alSiE3gquw==",
|
||||
"version": "1.36.9",
|
||||
"resolved": "https://registry.npmjs.org/bst-typed/-/bst-typed-1.36.9.tgz",
|
||||
"integrity": "sha512-FAQ6KiVuF6RCakPIgZwtZ/VdfKj2gL64rO/CN6DWP0jWYWoYvsqDW3pr83PvUhjNsxLQW5q92GT17wMOmjwDog==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"data-structure-typed": "^1.36.8"
|
||||
|
@ -4362,9 +4362,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/heap-typed": {
|
||||
"version": "1.36.8",
|
||||
"resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.36.8.tgz",
|
||||
"integrity": "sha512-hk/W8DIgU8jTDdD2fbjVxnYUha30DCJrkt7LDnA0V1yWiMt1/YgJOToQVodMcPh3yN25dNQLGo8MVGnonlYhZQ==",
|
||||
"version": "1.36.9",
|
||||
"resolved": "https://registry.npmjs.org/heap-typed/-/heap-typed-1.36.9.tgz",
|
||||
"integrity": "sha512-Dy7W2SooiSAc3+2Kcdb7/GvJXkguUc+hz2qLKvSbdisH6z4siOoNYoVmZJjSrc11udW1JpEINK+LqjOBlLAxiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"data-structure-typed": "^1.36.8"
|
||||
|
|
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "data-structure-typed",
|
||||
"version": "1.36.9",
|
||||
"version": "1.37.0",
|
||||
"description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
|
||||
"main": "dist/index.js",
|
||||
"module": "lib/index.js",
|
||||
|
@ -58,17 +58,17 @@
|
|||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"avl-tree-typed": "^1.36.8",
|
||||
"avl-tree-typed": "^1.36.9",
|
||||
"benchmark": "^2.1.4",
|
||||
"binary-tree-typed": "^1.36.8",
|
||||
"bst-typed": "^1.36.8",
|
||||
"binary-tree-typed": "^1.36.9",
|
||||
"bst-typed": "^1.36.9",
|
||||
"dependency-cruiser": "^14.1.0",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"heap-typed": "^1.36.8",
|
||||
"heap-typed": "^1.36.9",
|
||||
"istanbul-badges-readme": "^1.8.5",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.0.3",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {AnyFunction} from '../types';
|
||||
|
||||
const isDebug = false;
|
||||
const orderReducedBy = 2; // reduction of bigO's order compared to the baseline bigO
|
||||
|
||||
export const magnitude = {
|
||||
|
@ -148,12 +149,12 @@ export function logBigOMetricsWrap<F extends AnyFunction>(fn: F, args: Parameter
|
|||
methodLog.push([runTime, maxDataSize]);
|
||||
|
||||
if (methodLog.length >= 20) {
|
||||
console.log('triggered', methodName, methodLog);
|
||||
isDebug && console.log('triggered', methodName, methodLog);
|
||||
const bigO = estimateBigO(
|
||||
methodLog.map(([runTime]) => runTime),
|
||||
methodLog.map(([runTime]) => runTime)
|
||||
);
|
||||
console.log(`Estimated Big O: ${bigO}`);
|
||||
isDebug && console.log(`Estimated Big O: ${bigO}`);
|
||||
methodLogs.delete(methodName);
|
||||
}
|
||||
}
|
||||
|
@ -182,12 +183,12 @@ export function logBigOMetrics(target: any, propertyKey: string, descriptor: Pro
|
|||
methodLog.push([runTime, maxDataSize]);
|
||||
|
||||
if (methodLog.length >= 20) {
|
||||
console.log('triggered', methodName, methodLog);
|
||||
isDebug && console.log('triggered', methodName, methodLog);
|
||||
const bigO = estimateBigO(
|
||||
methodLog.map(([runTime]) => runTime),
|
||||
methodLog.map(([runTime]) => runTime)
|
||||
);
|
||||
console.log(`Estimated Big O: ${bigO}`);
|
||||
isDebug && console.log(`Estimated Big O: ${bigO}`);
|
||||
methodLogs.delete(methodName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue