UNPKG

@pranavpatel.ca/algo-kombin

Version:

KombiN is a library for bijectively mapping all ordered pairs from two finite sets into a single linear index. It orders pairs by ascending weight (sum of indices) using a three-region zig-zag algorithm, enabling O(1) bidirectional lookups between pairs a

57 lines (55 loc) 1.65 kB
{ "name": "@pranavpatel.ca/algo-kombin", "version": "1.0.3", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "build": "tsc", "test": "mocha -r ts-node/register test/**/*.spec.ts", "lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix" }, "keywords": [ "index", "combination", "mapping", "bijection", "pairs", "discrete-mathematics", "algorithm", "lookup", "cross-language", "zig-zag", "O(1)", "combinatorics" ], "author": "Pranavkumar Patel", "license": "MIT", "description": "KombiN is a library for bijectively mapping all ordered pairs from two finite sets into a single linear index. It orders pairs by ascending weight (sum of indices) using a three-region zig-zag algorithm, enabling O(1) bidirectional lookups between pairs and indices.", "devDependencies": { "@types/chai": "^5.2.2", "@types/mocha": "^10.0.10", "@types/node": "^24.0.14", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", "chai": "^5.2.1", "eslint": "^9.31.0", "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.5.1", "mocha": "^11.7.1", "prettier": "^3.6.2", "ts-node": "^10.9.2", "typescript": "^5.8.3" }, "directories": { "test": "test" }, "repository": { "type": "git", "url": "git+https://github.com/octopranav/KombiN.git" }, "bugs": { "url": "https://github.com/octopranav/KombiN/issues" }, "homepage": "https://github.com/octopranav/KombiN#readme", "dependencies": {} }