Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

27
backend/node_modules/obliterator/power-set.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
* Obliterator Power Set Function
* ===============================
*
* Iterator returning the power set of the given array.
*/
var Iterator = require('./iterator.js'),
combinations = require('./combinations.js'),
chain = require('./chain.js');
/**
* Power set.
*
* @param {array} array - Target array.
* @return {Iterator}
*/
module.exports = function powerSet(array) {
var n = array.length;
var iterators = new Array(n + 1);
iterators[0] = Iterator.of([]);
for (var i = 1; i < n + 1; i++) iterators[i] = combinations(array, i);
return chain.apply(null, iterators);
};