@explorable-viz/fluid 0.7.88 → 0.7.90
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/README.md +11 -6
- package/dist/fluid/fluid/lib/matrix.fld +39 -0
- package/dist/fluid/fluid/lib/prelude.fld +2 -2
- package/dist/fluid/fluid/lib/stats.fld +21 -22
- package/dist/fluid/shared/fluid.mjs +3253 -4601
- package/dist/fluid/shared/load-figure.js +6653 -5851
- package/dist/fluid/shared/webtest-lib.js +18 -18
- package/package.json +2 -3
- package/script/bundle-website.sh +8 -29
- package/.spago/affjax-node/v1.0.0/.editorconfig +0 -13
- package/.spago/affjax-node/v1.0.0/.eslintrc.json +0 -30
- package/.spago/affjax-node/v1.0.0/.gitignore +0 -13
- package/.spago/argonaut/v9.0.0/.editorconfig +0 -13
- package/.spago/argonaut/v9.0.0/.gitignore +0 -9
- package/.spago/argonaut/v9.0.0/.tidyrc.json +0 -10
- package/.spago/argonaut-traversals/v10.0.0/.editorconfig +0 -13
- package/.spago/argonaut-traversals/v10.0.0/.gitignore +0 -9
- package/.spago/argonaut-traversals/v10.0.0/.tidyrc.json +0 -10
- package/.spago/avar/v5.0.0/.editorconfig +0 -13
- package/.spago/avar/v5.0.0/.eslintrc.json +0 -29
- package/.spago/avar/v5.0.0/.gitignore +0 -14
- package/.spago/avar/v5.0.0/.tidyrc.json +0 -10
- package/.spago/fork/v6.0.0/.editorconfig +0 -13
- package/.spago/fork/v6.0.0/.gitignore +0 -9
- package/.spago/fork/v6.0.0/.tidyrc.json +0 -10
- package/.spago/node-http/v8.0.0/.eslintrc.json +0 -29
- package/.spago/node-http/v8.0.0/.gitignore +0 -8
- package/.spago/node-net/v4.0.0/.eslintrc.json +0 -29
- package/.spago/node-net/v4.0.0/.gitignore +0 -8
- package/.spago/node-url/v6.0.0/.eslintrc.json +0 -26
- package/.spago/node-url/v6.0.0/.gitignore +0 -8
- package/.spago/options/v7.0.0/.editorconfig +0 -13
- package/.spago/options/v7.0.0/.gitignore +0 -9
- package/.spago/options/v7.0.0/.tidyrc.json +0 -10
- package/.spago/pathy/v9.0.0/.editorconfig +0 -13
- package/.spago/pathy/v9.0.0/.gitignore +0 -9
- package/.spago/pathy/v9.0.0/.tidyrc.json +0 -10
- package/.spago/profunctor-lenses/v8.0.0/.editorconfig +0 -13
- package/.spago/profunctor-lenses/v8.0.0/.gitignore +0 -9
- package/.spago/profunctor-lenses/v8.0.0/.tidyrc.json +0 -10
- package/dist/fluid/fluid/lib/convolution.fld +0 -31
- package/script/bundle-page.sh +0 -30
@@ -1,31 +0,0 @@
|
|
1
|
-
let zero m n image =
|
2
|
-
let (m_max, n_max) = dims image
|
3
|
-
in if (m >= 1) `and` (m <= m_max) `and` (n >= 1) `and` (n <= n_max)
|
4
|
-
then image!(m, n)
|
5
|
-
else 0;
|
6
|
-
|
7
|
-
let wrap m n image =
|
8
|
-
let (m_max, n_max) = dims image
|
9
|
-
in image!( ((m - 1) `mod` m_max) + 1, ((n - 1) `mod` n_max) + 1);
|
10
|
-
|
11
|
-
let extend m n image =
|
12
|
-
let (m_max, n_max) = dims image;
|
13
|
-
m' = min (max m 1) m_max;
|
14
|
-
n' = min (max n 1) n_max
|
15
|
-
in image!(m', n');
|
16
|
-
|
17
|
-
let matrixSum matr =
|
18
|
-
let (m, n) = dims matr
|
19
|
-
in sum [ matr!(i, j) | (i, j) <- range (1, 1) (m, n)];
|
20
|
-
|
21
|
-
let convolve image kernel lookup =
|
22
|
-
let ((m, n), (i, j)) = (dims image, dims kernel);
|
23
|
-
(half_i, half_j) = (i `quot` 2, j `quot` 2);
|
24
|
-
area = i * j
|
25
|
-
in [|let interMatrix = [|
|
26
|
-
let x = m' + i' - 1 - half_i;
|
27
|
-
y = n' + j' - 1 - half_j
|
28
|
-
in lookup x y image * kernel!(i', j')
|
29
|
-
| (i', j') in (i, j) |]
|
30
|
-
in matrixSum interMatrix `quot` area
|
31
|
-
| (m', n') in (m, n) |];
|
package/script/bundle-page.sh
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
# run from project root
|
3
|
-
set -xe
|
4
|
-
|
5
|
-
PREFIX=""
|
6
|
-
|
7
|
-
if [ -n "${2:-}" ]; then
|
8
|
-
PREFIX=$2
|
9
|
-
fi
|
10
|
-
|
11
|
-
MODULE=$1
|
12
|
-
SRC_PATH=${MODULE//./\/}
|
13
|
-
SRC_PATH_LISP_CASE=$(./$PREFIX/script/util/lisp-case.sh "$SRC_PATH")
|
14
|
-
echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
|
15
|
-
|
16
|
-
if [[ -e "website/$SRC_PATH.purs" ]]; then
|
17
|
-
. "${PREFIX:+$PREFIX}/script/util/bundle.sh" $SRC_PATH_LISP_CASE Website.$MODULE
|
18
|
-
|
19
|
-
if [[ -e "website/$SRC_PATH.html" ]]; then
|
20
|
-
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
|
21
|
-
else
|
22
|
-
cp website/template.html dist/$SRC_PATH_LISP_CASE/index.html
|
23
|
-
fi
|
24
|
-
fi
|
25
|
-
|
26
|
-
if [[ -e "website/$SRC_PATH.json" ]]; then
|
27
|
-
mkdir -p dist/$SRC_PATH_LISP_CASE
|
28
|
-
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
|
29
|
-
cp website/$SRC_PATH.json dist/$SRC_PATH_LISP_CASE/spec.json
|
30
|
-
fi
|