Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function nPoint(selectorEnum) {
var enu = selectorEnum.getEnumerator();
return Ix.Enumerable.repeat(1)
.select(function() {
var a = next(enu);
var b = next(enu);
var l = a.length;
var child = [];
for (var i = 0; i < l; i++) {
if (Math.random() > 0.499) {
child[i] = a[i];
} else {
child[i] = b[i];
}
}
return child;
});
function populationEnumerator(basePopulation) {
return Ix.Enumerable.repeat(1).select(function() {
return basePopulation;
});
}
function populationEnumerator(basePopulation) {
return Ix.Enumerable.repeat(1).select(function() {
return basePopulation;
});
}
function fallback(...values: T[]) {
return Ix.Enumerable
.fromArray(values)
.where(x => x != null)
.firstOrDefault();
}