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.
21 lines
367 B
21 lines
367 B
'use strict'
|
|
|
|
module.exports = convexHull2D
|
|
|
|
var monotoneHull = require('monotone-convex-hull-2d')
|
|
|
|
function convexHull2D(points) {
|
|
var hull = monotoneHull(points)
|
|
var h = hull.length
|
|
if(h <= 2) {
|
|
return []
|
|
}
|
|
var edges = new Array(h)
|
|
var a = hull[h-1]
|
|
for(var i=0; i<h; ++i) {
|
|
var b = hull[i]
|
|
edges[i] = [a,b]
|
|
a = b
|
|
}
|
|
return edges
|
|
}
|
|
|