MCPcopy Create free account
hub / github.com/microsoft/SandDance / blurY

Function blurY

docs/app/js/sanddance-app.js:130887–130896  ·  view source on GitHub ↗
(n, m, source, target, r)

Source from the content-addressed store, hash-verified

130885 }
130886}
130887function blurY(n, m, source, target, r) {
130888 const w = (r << 1) + 1;
130889 for(let i = 0; i < n; ++i)for(let j = 0, sr = 0; j < m + r; ++j){
130890 if (j < m) sr += source[i + j * n];
130891 if (j >= r) {
130892 if (j >= w) sr -= source[i + (j - w) * n];
130893 target[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);
130894 }
130895 }
130896}
130897/**
130898 * Perform 2D kernel-density estimation of point data.
130899 * @constructor

Callers 1

densityFunction · 0.70

Calls 1

minMethod · 0.45

Tested by

no test coverage detected