StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
624 B
29 lines
624 B
4 years ago
|
export function contains(array, target) {
|
||
|
return array.indexOf(target) !== -1;
|
||
|
}
|
||
|
export function remove(array, target) {
|
||
|
return array.splice(array.indexOf(target), 1);
|
||
|
}
|
||
|
export function merge(target, source) {
|
||
|
for (const item of source) {
|
||
|
target.push(item);
|
||
|
}
|
||
|
|
||
|
return target;
|
||
|
}
|
||
|
export function from(source) {
|
||
|
return merge([], source);
|
||
|
}
|
||
|
export function findIndex(array, func) {
|
||
|
for (let i = 0; i < array.length; i++) {
|
||
|
if (func(array[i], i, array)) {
|
||
|
return i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return -1;
|
||
|
}
|
||
|
export function find(array, func) {
|
||
|
return array[findIndex(array, func)];
|
||
|
}
|
||
|
//# sourceMappingURL=arr.js.map
|