@thi.ng/fuzzy-viz 2.1.41 → 2.1.42
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/CHANGELOG.md +1 -1
- package/package.json +9 -9
- package/strategy.d.ts +7 -5
- package/strategy.js +7 -5
- package/var.d.ts +5 -4
- package/var.js +5 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/fuzzy-viz",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.42",
|
|
4
4
|
"description": "Visualization, instrumentation & introspection utils for @thi.ng/fuzzy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.6.
|
|
38
|
-
"@thi.ng/fuzzy": "^2.1.
|
|
39
|
-
"@thi.ng/hiccup": "^4.2.
|
|
40
|
-
"@thi.ng/hiccup-svg": "^4.3.
|
|
41
|
-
"@thi.ng/math": "^5.3.
|
|
42
|
-
"@thi.ng/strings": "^3.3.
|
|
43
|
-
"@thi.ng/text-canvas": "^2.4.
|
|
37
|
+
"@thi.ng/api": "^8.6.1",
|
|
38
|
+
"@thi.ng/fuzzy": "^2.1.21",
|
|
39
|
+
"@thi.ng/hiccup": "^4.2.27",
|
|
40
|
+
"@thi.ng/hiccup-svg": "^4.3.25",
|
|
41
|
+
"@thi.ng/math": "^5.3.17",
|
|
42
|
+
"@thi.ng/strings": "^3.3.21",
|
|
43
|
+
"@thi.ng/text-canvas": "^2.4.22"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "^7.33.7",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"parent": "@thi.ng/fuzzy",
|
|
92
92
|
"year": 2020
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
|
|
95
95
|
}
|
package/strategy.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { Fn3, IClear, IDeref } from "@thi.ng/api";
|
|
|
2
2
|
import type { DefuzzStrategy, FuzzyFn, LVarDomain } from "@thi.ng/fuzzy";
|
|
3
3
|
import type { AsciiVizOpts, InstrumentFn, VizualizeVarOpts } from "./api.js";
|
|
4
4
|
/**
|
|
5
|
-
* Higher order function. Takes an existing
|
|
5
|
+
* Higher order function. Takes an existing
|
|
6
|
+
* [`DefuzzStrategy`](https://docs.thi.ng/umbrella/fuzzy/types/DefuzzStrategy.html)
|
|
6
7
|
* and an instrumentation function. Returns new `DefuzzStrategy` which first
|
|
7
8
|
* executes original `strategy`, then calls `instrument` with the same args AND
|
|
8
9
|
* the computed result obtained from `strategy`. Returns result of original
|
|
@@ -11,10 +12,11 @@ import type { AsciiVizOpts, InstrumentFn, VizualizeVarOpts } from "./api.js";
|
|
|
11
12
|
* @remarks
|
|
12
13
|
* The instrumentation function is intended to perform side effects (e.g. debug
|
|
13
14
|
* outputs) and/or produce secondary results (e.g. visualizations). The latter
|
|
14
|
-
* can be obtained through the
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* can be obtained through the
|
|
16
|
+
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) mechanism
|
|
17
|
+
* implemented by the returned function. Since {@link defuzz} might call the
|
|
18
|
+
* strategy multiple times (i.e. if there are multiple output vars used),
|
|
19
|
+
* `.deref()` will always return an array of secondary results.
|
|
18
20
|
*
|
|
19
21
|
* Note: The secondary results from the instrumentation function will persist &
|
|
20
22
|
* accumulate. If re-using the instrumented strategy for multiple `defuzz()`
|
package/strategy.js
CHANGED
|
@@ -6,7 +6,8 @@ import { repeat } from "@thi.ng/strings/repeat";
|
|
|
6
6
|
import { barChartHLines } from "@thi.ng/text-canvas/bars";
|
|
7
7
|
import { varToHiccup } from "./var.js";
|
|
8
8
|
/**
|
|
9
|
-
* Higher order function. Takes an existing
|
|
9
|
+
* Higher order function. Takes an existing
|
|
10
|
+
* [`DefuzzStrategy`](https://docs.thi.ng/umbrella/fuzzy/types/DefuzzStrategy.html)
|
|
10
11
|
* and an instrumentation function. Returns new `DefuzzStrategy` which first
|
|
11
12
|
* executes original `strategy`, then calls `instrument` with the same args AND
|
|
12
13
|
* the computed result obtained from `strategy`. Returns result of original
|
|
@@ -15,10 +16,11 @@ import { varToHiccup } from "./var.js";
|
|
|
15
16
|
* @remarks
|
|
16
17
|
* The instrumentation function is intended to perform side effects (e.g. debug
|
|
17
18
|
* outputs) and/or produce secondary results (e.g. visualizations). The latter
|
|
18
|
-
* can be obtained through the
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* can be obtained through the
|
|
20
|
+
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) mechanism
|
|
21
|
+
* implemented by the returned function. Since {@link defuzz} might call the
|
|
22
|
+
* strategy multiple times (i.e. if there are multiple output vars used),
|
|
23
|
+
* `.deref()` will always return an array of secondary results.
|
|
22
24
|
*
|
|
23
25
|
* Note: The secondary results from the instrumentation function will persist &
|
|
24
26
|
* accumulate. If re-using the instrumented strategy for multiple `defuzz()`
|
package/var.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { LVar } from "@thi.ng/fuzzy";
|
|
2
2
|
import type { VizualizeVarOpts } from "./api.js";
|
|
3
3
|
/**
|
|
4
|
-
* Takes an
|
|
5
|
-
* of the var's fuzzy sets in the var's
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Takes an [`LVar`](https://docs.thi.ng/umbrella/fuzzy/interfaces/LVar.html)
|
|
5
|
+
* and visualization options. Evaluates all of the var's fuzzy sets in the var's
|
|
6
|
+
* value domain and visualizes them as polygons. Returns a
|
|
7
|
+
* [thi.ng/hiccup-canvas](https://thi.ng/thi.ng/hiccup-canvas) compatible shape
|
|
8
|
+
* component tree.
|
|
8
9
|
*
|
|
9
10
|
* @param var -
|
|
10
11
|
* @param opts -
|
package/var.js
CHANGED
|
@@ -4,10 +4,11 @@ import { serialize } from "@thi.ng/hiccup/serialize";
|
|
|
4
4
|
import { fit } from "@thi.ng/math/fit";
|
|
5
5
|
import { inRange } from "@thi.ng/math/interval";
|
|
6
6
|
/**
|
|
7
|
-
* Takes an
|
|
8
|
-
* of the var's fuzzy sets in the var's
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Takes an [`LVar`](https://docs.thi.ng/umbrella/fuzzy/interfaces/LVar.html)
|
|
8
|
+
* and visualization options. Evaluates all of the var's fuzzy sets in the var's
|
|
9
|
+
* value domain and visualizes them as polygons. Returns a
|
|
10
|
+
* [thi.ng/hiccup-canvas](https://thi.ng/thi.ng/hiccup-canvas) compatible shape
|
|
11
|
+
* component tree.
|
|
11
12
|
*
|
|
12
13
|
* @param var -
|
|
13
14
|
* @param opts -
|