@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.
@@ -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 "Dimension mismatch"
38
- else [| sum [ a!(i', k) * b!(k, j') | k <- enumFromTo 1 n]
39
- | (i', j') in (m, j) |];
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) |];