Function
blurY
(n, m, source, target, r)
Source from the content-addressed store, hash-verified
| 130885 | } |
| 130886 | } |
| 130887 | function 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 |
Tested by
no test coverage detected