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.
25 lines
500 B
25 lines
500 B
4 years ago
|
"use strict"
|
||
|
|
||
|
var convexHull1d = require('./lib/ch1d')
|
||
|
var convexHull2d = require('./lib/ch2d')
|
||
|
var convexHullnd = require('./lib/chnd')
|
||
|
|
||
|
module.exports = convexHull
|
||
|
|
||
|
function convexHull(points) {
|
||
|
var n = points.length
|
||
|
if(n === 0) {
|
||
|
return []
|
||
|
} else if(n === 1) {
|
||
|
return [[0]]
|
||
|
}
|
||
|
var d = points[0].length
|
||
|
if(d === 0) {
|
||
|
return []
|
||
|
} else if(d === 1) {
|
||
|
return convexHull1d(points)
|
||
|
} else if(d === 2) {
|
||
|
return convexHull2d(points)
|
||
|
}
|
||
|
return convexHullnd(points, d)
|
||
|
}
|