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/zero-crossings/lib/generate-module.js

25 lines
670 B

4 years ago
"use strict"
var parse = require("cwise-parser")
var beautify = require("js-beautify")
var empty_func = JSON.stringify(parse(function(){}))
var proc = [
"module.exports=require('cwise-compiler')({",
"args:['array',{offset:[1],array:0},'scalar','scalar','index']",
",pre:", empty_func,
",post:", empty_func,
",body:",
JSON.stringify(parse(function zeroCrossings(a, b, out, level, idx) {
var da = a - level
var db = b - level
if((da >= 0) !== (db >= 0)) {
out.push(idx[0] + 0.5 + 0.5 * (da + db) / (da - db))
}
})),
",funcName:'zeroCrossings'",
"})"
]
console.log(beautify(proc.join("")))