@explorable-viz/fluid 0.7.76 → 0.7.78

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.
@@ -0,0 +1,13 @@
1
+ # https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
@@ -0,0 +1,30 @@
1
+ {
2
+ "env": { "browser": true },
3
+ "extends": "eslint:recommended",
4
+ "parserOptions": { "ecmaVersion": 6, "sourceType": "module" },
5
+ "rules": {
6
+ "block-scoped-var": "error",
7
+ "consistent-return": "error",
8
+ "eqeqeq": "error",
9
+ "guard-for-in": "error",
10
+ "no-bitwise": "error",
11
+ "no-caller": "error",
12
+ "no-constant-condition": ["error", { "checkLoops": false }],
13
+ "no-extra-parens": "off",
14
+ "no-extend-native": "error",
15
+ "no-loop-func": "error",
16
+ "no-new": "error",
17
+ "no-param-reassign": "error",
18
+ "no-return-assign": "error",
19
+ "no-sequences": "error",
20
+ "no-unused-expressions": "error",
21
+ "no-use-before-define": "error",
22
+ "no-undef": "error",
23
+ "no-eq-null": "error",
24
+ "radix": ["error", "always"],
25
+ "indent": ["error", 2, { "SwitchCase": 0 }],
26
+ "quotes": ["error", "double"],
27
+ "semi": ["error", "always"],
28
+ "strict": ["error", "global"]
29
+ }
30
+ }
@@ -0,0 +1,13 @@
1
+ .*
2
+ !.gitignore
3
+ !.github
4
+ !.editorconfig
5
+ !.eslintrc.json
6
+
7
+ output
8
+ generated-docs
9
+ bower_components
10
+
11
+ node_modules
12
+ package-lock.json
13
+ *.lock
@@ -0,0 +1,13 @@
1
+ # https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
@@ -0,0 +1,9 @@
1
+ .*
2
+ !.gitignore
3
+ !.github
4
+ !.editorconfig
5
+ !.tidyrc.json
6
+
7
+ output
8
+ generated-docs
9
+ bower_components
@@ -0,0 +1,10 @@
1
+ {
2
+ "importSort": "source",
3
+ "importWrap": "source",
4
+ "indent": 2,
5
+ "operatorsFile": null,
6
+ "ribbon": 1,
7
+ "typeArrowPlacement": "first",
8
+ "unicode": "never",
9
+ "width": null
10
+ }
@@ -55,3 +55,22 @@ let likelihoodLE data target =
55
55
 
56
56
  let likelihoodGE data target =
57
57
  length (filter (fun x -> x >= target) data) / length data;
58
+
59
+ let likelihoodMap table prob = (fromSome (find (fun x -> x.prob <= prob) table)).msg;
60
+
61
+ let mkPercent num = (numToStr (num * 100)) ++ "%";
62
+
63
+ let leqP n m =
64
+ if n <= m
65
+ then "less"
66
+ else "more";
67
+
68
+ let gradedLeqP n m =
69
+ let ratio = n / m
70
+ in if ratio <= 1.0
71
+ then if ratio <=0.5
72
+ then "much less"
73
+ else "less"
74
+ else if ratio >= 2.0
75
+ then "much more"
76
+ else "more";