How to use the js-combinatorics.VERSION function in js-combinatorics

To help you get started, we’ve selected a few js-combinatorics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / js-combinatorics / js-combinatorics-tests.ts View on Github external
const allCartesianProduct3s:[string, number, boolean][] = cartesianProduct3.toArray();
const cartesianProduct3sCount = cartesianProduct3.length;
const nthCartesianProduct3:[string, number, boolean] = cartesianProduct3.nth(3);
const cartesianProduct3ByCoords:[string, number, boolean] = cartesianProduct3.get(1, 1);

const cartesianProductAny = Combinatorics.cartesianProduct(["a", 1, true], [false, 2, "b"]);
const nextCartesianProductAny:any[] = cartesianProductAny.next();
cartesianProductAny.forEach((i:any[]) => console.log(i));
const cartesianProductAnysLengths:number[] = cartesianProductAny.map((i:any[]) => i.length);
const filteredCartesianProductAnys:any[][] = cartesianProductAny.filter((i:any[]) => i.length > 0);
const allCartesianProductAnys:any[][] = cartesianProductAny.toArray();
const cartesianProductAnysCount = cartesianProductAny.length;
const nthCartesianProductAny:any[] = cartesianProductAny.nth(3);
const cartesianProductAnyByCoords:any[] = cartesianProductAny.get(1, 1);

const version:string = Combinatorics.VERSION;
github DefinitelyTyped / DefinitelyTyped / types / js-combinatorics / js-combinatorics-tests.ts View on Github external
const allCartesianProduct3s:[string, number, boolean][] = cartesianProduct3.toArray();
const cartesianProduct3sCount = cartesianProduct3.length;
const nthCartesianProduct3:[string, number, boolean] = cartesianProduct3.nth(3);
const cartesianProduct3ByCoords:[string, number, boolean] = cartesianProduct3.get(1, 1);

const cartesianProductAny = Combinatorics.cartesianProduct(["a", 1, true], [false, 2, "b"]);
const nextCartesianProductAny:any[] = cartesianProductAny.next();
cartesianProductAny.forEach((i:any[]) => console.log(i));
const cartesianProductAnysLengths:number[] = cartesianProductAny.map((i:any[]) => i.length);
const filteredCartesianProductAnys:any[][] = cartesianProductAny.filter((i:any[]) => i.length > 0);
const allCartesianProductAnys:any[][] = cartesianProductAny.toArray();
const cartesianProductAnysCount = cartesianProductAny.length;
const nthCartesianProductAny:any[] = cartesianProductAny.nth(3);
const cartesianProductAnyByCoords:any[] = cartesianProductAny.get(1, 1);

const version:string = Combinatorics.VERSION;