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/vega-voronoi/build/vega-voronoi.min.js

1 line
1.3 KiB

4 years ago
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util"),require("d3-delaunay")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util","d3-delaunay"],t):t(((e=e||self).vega=e.vega||{},e.vega.transforms={}),e.vega,e.vega,e.d3)}(this,function(e,t,n,a){"use strict";function r(e){t.Transform.call(this,null,e)}r.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const o=n.inherits(r,t.Transform),i=[-1e5,-1e5,1e5,1e5];function l(e){const t=e[0][0],n=e[0][1];let a=e.length-1;for(;e[a][0]===t&&e[a][1]===n;--a);return"M"+e.slice(0,a+1).join("L")+"Z"}o.transform=function(e,t){const n=e.as||"path",r=t.source;if(!r||!r.length)return t;let o=e.size;o=o?[0,0,o[0],o[1]]:(o=e.extent)?[o[0][0],o[0][1],o[1][0],o[1][1]]:i;const f=this.value=a.Delaunay.from(r,e.x,e.y).voronoi(o);for(let e=0,t=r.length;e<t;++e){const t=f.cellPolygon(e);r[e][n]=t?l(t):null}return t.reflow(e.modified()).modifies(n)},e.voronoi=r,Object.defineProperty(e,"__esModule",{value:!0})});