@explorable-viz/fluid 0.8.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/fluid/lib/matrix.fld +6 -4
- package/dist/fluid/shared/fluid.mjs +3668 -3881
- package/dist/fluid/shared/load-figure.js +5490 -4439
- package/dist/fluid/shared/webtest-lib.js +45094 -23097
- package/package.json +3 -3
- package/website/article/convolution/spec.json +0 -1
- package/website/article/fluid/convolution.fld +1 -1
- package/website/article/fluid/dataset/methane-emissions.json +111 -0
- package/website/article/fluid/dataset/non-renewables.json +67 -0
- package/website/article/fluid/dataset/renewable.json +301 -0
- package/website/article/fluid/methane.fld +1 -0
- package/website/article/fluid/moving-average.fld +2 -0
- package/website/article/fluid/non-renewables.fld +2 -0
- package/website/article/fluid/nonRenewables.fld +2 -0
- package/website/article/moving-average/spec.json +0 -1
- package/website/article/non-renewables/spec.json +0 -1
- package/website/css/styles.css +0 -4
- package/website/css/view-styles.css +8 -0
- package/website/article/fluid/dataset/methane-emissions.fld +0 -123
- package/website/article/fluid/dataset/non-renewables.fld +0 -67
- package/website/article/fluid/dataset/renewables-new.fld +0 -301
- package/website/article/fluid/dataset/scigen/1805.02474v1-10.fld +0 -17
- package/website/article/fluid/util.fld +0 -36
@@ -23,9 +23,10 @@ let convolve image kernel lookup =
|
|
23
23
|
(half_i, half_j) = (i `quot` 2, j `quot` 2);
|
24
24
|
area = i * j
|
25
25
|
in [| let interMatrix =
|
26
|
-
"""Intermediate matrix for element (${m'}, ${n'})"""
|
26
|
+
@doc("""Intermediate matrix for element (${m'}, ${n'})""")
|
27
27
|
[| let x = m' + i' - 1 - half_i;
|
28
28
|
y = n' + j' - 1 - half_j in
|
29
|
+
@doc("""Multiply these two elements""")
|
29
30
|
lookup x y image * kernel!(i', j')
|
30
31
|
| (i', j') in (i, j) |]
|
31
32
|
in matrixSum interMatrix `quot` area
|
@@ -34,6 +35,7 @@ let convolve image kernel lookup =
|
|
34
35
|
let matMul a b =
|
35
36
|
let ((m, n), (i, j)) = (dims a, dims b) in
|
36
37
|
if not (n == i)
|
37
|
-
then error "
|
38
|
-
else
|
39
|
-
|
38
|
+
then error "Dimensions don't line up"
|
39
|
+
else @doc("""Intermediate matrix""")
|
40
|
+
[| sum [ a!(i', k) * b!(k, j') | k <- enumFromTo 1 n]
|
41
|
+
| (i', j') in (m, j) |];
|