@thi.ng/fuzzy 2.1.100 → 2.1.102
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/README.md +1 -1
- package/package.json +6 -7
- package/rules.d.ts +1 -1
- package/shapes.d.ts +7 -6
- package/tnorms.d.ts +8 -8
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/fuzzy",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.102",
|
|
4
4
|
"description": "Fuzzy logic operators & configurable rule inferencing engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -33,19 +33,18 @@
|
|
|
33
33
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
34
34
|
"clean": "bun ../../tools/src/clean-package.ts strategies",
|
|
35
35
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
36
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
37
36
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
38
37
|
"pub": "yarn npm publish --access public",
|
|
39
38
|
"test": "bun test",
|
|
40
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/math": "^5.11.
|
|
42
|
+
"@thi.ng/api": "^8.11.20",
|
|
43
|
+
"@thi.ng/math": "^5.11.20"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"esbuild": "^0.
|
|
48
|
-
"typedoc": "^0.27.
|
|
46
|
+
"esbuild": "^0.25.0",
|
|
47
|
+
"typedoc": "^0.27.7",
|
|
49
48
|
"typescript": "^5.7.3"
|
|
50
49
|
},
|
|
51
50
|
"keywords": [
|
|
@@ -105,5 +104,5 @@
|
|
|
105
104
|
"thi.ng": {
|
|
106
105
|
"year": 2020
|
|
107
106
|
},
|
|
108
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
109
108
|
}
|
package/rules.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { LVarKeySet, LVarSet, Rule } from "./api.js";
|
|
|
12
12
|
* The optional rule weight (default: 1) is used by {@link defuzz} to adjust
|
|
13
13
|
* rule importance.
|
|
14
14
|
*
|
|
15
|
-
* Also
|
|
15
|
+
* Also see {@link and}, {@link strongAnd}, {@link or} for syntax sugar.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
package/shapes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FnN2, FnU, FnU2, FnU3, FnU4 } from "@thi.ng/api";
|
|
2
2
|
import type { FuzzyFn } from "./api.js";
|
|
3
3
|
/**
|
|
4
|
-
* HOF {@link FuzzyFn} always yielding given `x` (should be in [0,1]
|
|
4
|
+
* HOF {@link FuzzyFn} always yielding given `x` (should be in `[0,1]`
|
|
5
5
|
* interval).
|
|
6
6
|
*
|
|
7
7
|
* @param x -
|
|
@@ -16,8 +16,8 @@ export declare const constant: (x: number) => FuzzyFn;
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const point: (p: number, eps?: number) => FuzzyFn;
|
|
18
18
|
/**
|
|
19
|
-
* HOF {@link FuzzyFn} yielding a rising ramp in [a,b] interval, clamped to
|
|
20
|
-
|
|
19
|
+
* HOF {@link FuzzyFn} yielding a rising ramp in `[a,b]` interval, clamped to
|
|
20
|
+
*`[0,1]`outputs. Returns 0.0 for inputs <= `a` and 1.0 for inputs >= `b`.
|
|
21
21
|
*
|
|
22
22
|
* @param a -
|
|
23
23
|
* @param b -
|
|
@@ -25,8 +25,8 @@ export declare const point: (p: number, eps?: number) => FuzzyFn;
|
|
|
25
25
|
export declare const ramp: FnU2<number, FuzzyFn>;
|
|
26
26
|
/**
|
|
27
27
|
* HOF {@link FuzzyFn} yielding a triangle in the input range `[a..b..c]` with
|
|
28
|
-
* `b` defining the position of the peak value (1.0). Returns 0.0 for inputs
|
|
29
|
-
* `a`
|
|
28
|
+
* `b` defining the position of the peak value (1.0). Returns 0.0 for inputs
|
|
29
|
+
* outside the `[a,c]` interval.
|
|
30
30
|
*
|
|
31
31
|
* @param a -
|
|
32
32
|
* @param b -
|
|
@@ -119,7 +119,8 @@ export declare const invAlphaCut: (fn: FuzzyFn, alpha?: number) => FuzzyFn;
|
|
|
119
119
|
* - S-norm like function: 0.0
|
|
120
120
|
*
|
|
121
121
|
* References:
|
|
122
|
-
*
|
|
122
|
+
*
|
|
123
|
+
* - [Interactive graph](https://www.desmos.com/calculator/pnq6kqzfb5)
|
|
123
124
|
* - https://en.wikipedia.org/wiki/T-norm
|
|
124
125
|
* - https://github.com/thi-ng/umbrella/blob/develop/packages/fuzzy/src/tnorms.ts
|
|
125
126
|
*
|
package/tnorms.d.ts
CHANGED
|
@@ -8,36 +8,36 @@ export declare const tnormNilpotent: FnN2;
|
|
|
8
8
|
* HOF T-norm. Parametric Hamacher with `p` controlling curvature.
|
|
9
9
|
*
|
|
10
10
|
* @remarks
|
|
11
|
-
* Interactive graph
|
|
11
|
+
* [Interactive graph](https://www.desmos.com/calculator/4bneccqs3p)
|
|
12
12
|
*
|
|
13
|
-
* @param p - curve param [0
|
|
13
|
+
* @param p - curve param `[0,∞]`, default: 2
|
|
14
14
|
*/
|
|
15
15
|
export declare const tnormHamacher: (p?: number) => FnN2;
|
|
16
16
|
/**
|
|
17
17
|
* HOF T-norm. Parametric Yager with `p` controlling curvature.
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Interactive graph
|
|
20
|
+
* [Interactive graph](https://www.desmos.com/calculator/4bneccqs3p)
|
|
21
21
|
*
|
|
22
|
-
* @param p - curve param [0
|
|
22
|
+
* @param p - curve param `[0,∞]`, default: 2
|
|
23
23
|
*/
|
|
24
24
|
export declare const tnormYager: (p?: number) => FnN2;
|
|
25
25
|
/**
|
|
26
26
|
* HOF T-norm. Parametric Dombi with `p` controlling curvature.
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Interactive graph
|
|
29
|
+
* [Interactive graph](https://www.desmos.com/calculator/4bneccqs3p)
|
|
30
30
|
*
|
|
31
|
-
* @param p - curve param [0
|
|
31
|
+
* @param p - curve param `[0,∞]`, default: 2
|
|
32
32
|
*/
|
|
33
33
|
export declare const tnormDombi: (p?: number) => FnN2;
|
|
34
34
|
/**
|
|
35
35
|
* HOF T-norm. Parametric Aczél–Alsina with `p` controlling curvature.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* Interactive graph
|
|
38
|
+
* [Interactive graph](https://www.desmos.com/calculator/4bneccqs3p)
|
|
39
39
|
*
|
|
40
|
-
* @param p - curve param [0
|
|
40
|
+
* @param p - curve param `[0,∞]`, default: 2
|
|
41
41
|
*/
|
|
42
42
|
export declare const tnormAczelAlsina: (p?: number) => FnN2;
|
|
43
43
|
/**
|