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.
 
 
 
 
StackGenVis/frontend/node_modules/cubic-hermite/hermite.js

39 lines
889 B

"use strict"
function dcubicHermite(p0, v0, p1, v1, t, f) {
var dh00 = 6*t*t-6*t,
dh10 = 3*t*t-4*t + 1,
dh01 = -6*t*t+6*t,
dh11 = 3*t*t-2*t
if(p0.length) {
if(!f) {
f = new Array(p0.length)
}
for(var i=p0.length-1; i>=0; --i) {
f[i] = dh00*p0[i] + dh10*v0[i] + dh01*p1[i] + dh11*v1[i]
}
return f
}
return dh00*p0 + dh10*v0 + dh01*p1[i] + dh11*v1
}
function cubicHermite(p0, v0, p1, v1, t, f) {
var ti = (t-1), t2 = t*t, ti2 = ti*ti,
h00 = (1+2*t)*ti2,
h10 = t*ti2,
h01 = t2*(3-2*t),
h11 = t2*ti
if(p0.length) {
if(!f) {
f = new Array(p0.length)
}
for(var i=p0.length-1; i>=0; --i) {
f[i] = h00*p0[i] + h10*v0[i] + h01*p1[i] + h11*v1[i]
}
return f
}
return h00*p0 + h10*v0 + h01*p1 + h11*v1
}
module.exports = cubicHermite
module.exports.derivative = dcubicHermite