@thi.ng/gp 0.4.31 → 0.4.32
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/api.d.ts +3 -3
- package/ast.d.ts +11 -11
- package/ast.js +11 -11
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/api.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ export interface GPOpts<OP, T, ARGS> {
|
|
|
18
18
|
*/
|
|
19
19
|
ops: OpGenSpec<ARGS, OP>[];
|
|
20
20
|
/**
|
|
21
|
-
* Possibly seeded PRNG instance to be used for AST generation /
|
|
22
|
-
* editing.
|
|
21
|
+
* Possibly seeded PRNG instance to be used for AST generation / editing.
|
|
23
22
|
*
|
|
24
|
-
* @defaultValue
|
|
23
|
+
* @defaultValue
|
|
24
|
+
* [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html)
|
|
25
25
|
*/
|
|
26
26
|
rnd?: IRandom;
|
|
27
27
|
/**
|
package/ast.d.ts
CHANGED
|
@@ -37,26 +37,26 @@ export declare class AST<OP, T> {
|
|
|
37
37
|
*/
|
|
38
38
|
mutate(tree: ASTNode<OP, T>, maxDepth?: number): ASTNode<OP, T>;
|
|
39
39
|
/**
|
|
40
|
-
* Returns linearized/flat version of given AST as an array of
|
|
41
|
-
*
|
|
40
|
+
* Returns linearized/flat version of given AST as an array of [zipper
|
|
41
|
+
* locations](https://docs.thi.ng/umbrella/zipper/classes/Location.html).
|
|
42
42
|
*
|
|
43
43
|
* @param tree -
|
|
44
44
|
*/
|
|
45
45
|
linearizedAST(tree: ASTNode<OP, T>): Location<ASTNode<OP, T>>[];
|
|
46
46
|
/**
|
|
47
|
-
* Returns random {@link ASTNode} from given tree, using the user
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* Returns random {@link ASTNode} from given tree, using the user provided
|
|
48
|
+
* PRNG (via `opts`) or
|
|
49
|
+
* [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html).
|
|
50
|
+
* The returned value is a [zipper
|
|
51
|
+
* location](https://docs.thi.ng/umbrella/zipper/classes/Location.html) of
|
|
52
|
+
* the selected node.
|
|
52
53
|
*
|
|
53
54
|
* @remarks
|
|
54
55
|
* The actual `ASTNode` can be obtained via `.node`.
|
|
55
56
|
*
|
|
56
|
-
* Only nodes in the linearized index range `[min..max)` are
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* to the linearized tree end.
|
|
57
|
+
* Only nodes in the linearized index range `[min..max)` are returned
|
|
58
|
+
* (default: entire tree range). Since the linear tree length isn't known
|
|
59
|
+
* beforehand, `max` < 0 (default) is equivalent to the linearized tree end.
|
|
60
60
|
*
|
|
61
61
|
* @param opts -
|
|
62
62
|
* @param tree -
|
package/ast.js
CHANGED
|
@@ -77,8 +77,8 @@ export class AST {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
* Returns linearized/flat version of given AST as an array of
|
|
81
|
-
*
|
|
80
|
+
* Returns linearized/flat version of given AST as an array of [zipper
|
|
81
|
+
* locations](https://docs.thi.ng/umbrella/zipper/classes/Location.html).
|
|
82
82
|
*
|
|
83
83
|
* @param tree -
|
|
84
84
|
*/
|
|
@@ -88,19 +88,19 @@ export class AST {
|
|
|
88
88
|
];
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
* Returns random {@link ASTNode} from given tree, using the user
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
91
|
+
* Returns random {@link ASTNode} from given tree, using the user provided
|
|
92
|
+
* PRNG (via `opts`) or
|
|
93
|
+
* [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html).
|
|
94
|
+
* The returned value is a [zipper
|
|
95
|
+
* location](https://docs.thi.ng/umbrella/zipper/classes/Location.html) of
|
|
96
|
+
* the selected node.
|
|
96
97
|
*
|
|
97
98
|
* @remarks
|
|
98
99
|
* The actual `ASTNode` can be obtained via `.node`.
|
|
99
100
|
*
|
|
100
|
-
* Only nodes in the linearized index range `[min..max)` are
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* to the linearized tree end.
|
|
101
|
+
* Only nodes in the linearized index range `[min..max)` are returned
|
|
102
|
+
* (default: entire tree range). Since the linear tree length isn't known
|
|
103
|
+
* beforehand, `max` < 0 (default) is equivalent to the linearized tree end.
|
|
104
104
|
*
|
|
105
105
|
* @param opts -
|
|
106
106
|
* @param tree -
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/gp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"description": "Genetic programming helpers & strategies (tree based & multi-expression programming)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.6.
|
|
37
|
+
"@thi.ng/api": "^8.6.1",
|
|
38
38
|
"@thi.ng/errors": "^2.2.6",
|
|
39
|
-
"@thi.ng/math": "^5.3.
|
|
40
|
-
"@thi.ng/random": "^3.3.
|
|
41
|
-
"@thi.ng/transducers": "^8.3.
|
|
42
|
-
"@thi.ng/zipper": "^2.1.
|
|
39
|
+
"@thi.ng/math": "^5.3.17",
|
|
40
|
+
"@thi.ng/random": "^3.3.19",
|
|
41
|
+
"@thi.ng/transducers": "^8.3.27",
|
|
42
|
+
"@thi.ng/zipper": "^2.1.28"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-extractor": "^7.33.7",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"status": "alpha",
|
|
109
109
|
"year": 2019
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
|
|
112
112
|
}
|