@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
12 lines (11 loc) • 620 B
JavaScript
;
// Copyright (c) 2020 Pranavkumar Patel. All rights reserved. Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Table = void 0;
/**
* 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.
*/
var Table_1 = require("./Table");
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return Table_1.Table; } });