runmat 0.4.9-dev.2 → 0.4.10-dev.0
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/artifacts/stdlib.snapshot +0 -0
- package/dist/builtins.d.ts +1 -0
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js.map +1 -1
- package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
- package/dist/generated/builtin-examples-catalog.js +1 -1
- package/dist/generated/builtin-examples-catalog.js.map +1 -1
- package/dist/generated/builtins/complex.d.ts +4 -0
- package/dist/generated/builtins/complex.d.ts.map +1 -0
- package/dist/generated/builtins/complex.js +157 -0
- package/dist/generated/builtins/complex.js.map +1 -0
- package/dist/generated/builtins/cosd.d.ts +4 -0
- package/dist/generated/builtins/cosd.d.ts.map +1 -0
- package/dist/generated/builtins/cosd.js +109 -0
- package/dist/generated/builtins/cosd.js.map +1 -0
- package/dist/generated/builtins/db.d.ts +4 -0
- package/dist/generated/builtins/db.d.ts.map +1 -0
- package/dist/generated/builtins/db.js +122 -0
- package/dist/generated/builtins/db.js.map +1 -0
- package/dist/generated/builtins/fill3.d.ts +4 -0
- package/dist/generated/builtins/fill3.d.ts.map +1 -0
- package/dist/generated/builtins/fill3.js +152 -0
- package/dist/generated/builtins/fill3.js.map +1 -0
- package/dist/generated/builtins/fminbnd.d.ts +4 -0
- package/dist/generated/builtins/fminbnd.d.ts.map +1 -0
- package/dist/generated/builtins/fminbnd.js +104 -0
- package/dist/generated/builtins/fminbnd.js.map +1 -0
- package/dist/generated/builtins/integral.d.ts +4 -0
- package/dist/generated/builtins/integral.d.ts.map +1 -0
- package/dist/generated/builtins/integral.js +101 -0
- package/dist/generated/builtins/integral.js.map +1 -0
- package/dist/generated/builtins/mode.d.ts +4 -0
- package/dist/generated/builtins/mode.d.ts.map +1 -0
- package/dist/generated/builtins/mode.js +146 -0
- package/dist/generated/builtins/mode.js.map +1 -0
- package/dist/generated/builtins/optimset.d.ts.map +1 -1
- package/dist/generated/builtins/optimset.js +8 -4
- package/dist/generated/builtins/optimset.js.map +1 -1
- package/dist/generated/builtins/patch.d.ts +4 -0
- package/dist/generated/builtins/patch.d.ts.map +1 -0
- package/dist/generated/builtins/patch.js +135 -0
- package/dist/generated/builtins/patch.js.map +1 -0
- package/dist/generated/builtins/repelem.d.ts +4 -0
- package/dist/generated/builtins/repelem.d.ts.map +1 -0
- package/dist/generated/builtins/repelem.js +135 -0
- package/dist/generated/builtins/repelem.js.map +1 -0
- package/dist/generated/builtins/sawtooth.d.ts +4 -0
- package/dist/generated/builtins/sawtooth.d.ts.map +1 -0
- package/dist/generated/builtins/sawtooth.js +111 -0
- package/dist/generated/builtins/sawtooth.js.map +1 -0
- package/dist/generated/builtins/sinc.d.ts +4 -0
- package/dist/generated/builtins/sinc.d.ts.map +1 -0
- package/dist/generated/builtins/sinc.js +142 -0
- package/dist/generated/builtins/sinc.js.map +1 -0
- package/dist/generated/builtins/sind.d.ts +4 -0
- package/dist/generated/builtins/sind.d.ts.map +1 -0
- package/dist/generated/builtins/sind.js +109 -0
- package/dist/generated/builtins/sind.js.map +1 -0
- package/dist/generated/builtins/square.d.ts +4 -0
- package/dist/generated/builtins/square.d.ts.map +1 -0
- package/dist/generated/builtins/square.js +110 -0
- package/dist/generated/builtins/square.js.map +1 -0
- package/dist/generated/builtins/step.d.ts +4 -0
- package/dist/generated/builtins/step.d.ts.map +1 -0
- package/dist/generated/builtins/step.js +125 -0
- package/dist/generated/builtins/step.js.map +1 -0
- package/dist/generated/builtins/tand.d.ts +4 -0
- package/dist/generated/builtins/tand.d.ts.map +1 -0
- package/dist/generated/builtins/tand.js +109 -0
- package/dist/generated/builtins/tand.js.map +1 -0
- package/dist/generated/builtins-manifest.d.ts.map +1 -1
- package/dist/generated/builtins-manifest.js +323 -1
- package/dist/generated/builtins-manifest.js.map +1 -1
- package/dist/lsp/runmat_lsp.d.ts +2 -2
- package/dist/lsp/runmat_lsp.js +4 -4
- package/dist/lsp/runmat_lsp_bg.wasm +0 -0
- package/dist/lsp/runmat_lsp_bg.wasm.d.ts +2 -2
- package/dist/pkg-web/runmat_wasm_web.d.ts +42 -42
- package/dist/pkg-web/runmat_wasm_web.js +85 -85
- package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
- package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +35 -35
- package/dist/runtime/stdlib.snapshot +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/complex.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAwJjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "complex",
|
|
5
|
+
"category": "math/elementwise",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"complex",
|
|
8
|
+
"complex constructor",
|
|
9
|
+
"real part",
|
|
10
|
+
"imaginary part",
|
|
11
|
+
"complex storage",
|
|
12
|
+
"MATLAB complex"
|
|
13
|
+
],
|
|
14
|
+
"summary": "Construct complex double values from real and imaginary parts.",
|
|
15
|
+
"references": [
|
|
16
|
+
"https://www.mathworks.com/help/matlab/ref/complex.html"
|
|
17
|
+
],
|
|
18
|
+
"gpu_support": {
|
|
19
|
+
"elementwise": false,
|
|
20
|
+
"reduction": false,
|
|
21
|
+
"precisions": [],
|
|
22
|
+
"broadcasting": "scalar-only",
|
|
23
|
+
"notes": "Complex tensors are currently host-resident in RunMat. GPU tensor inputs are not accepted by this constructor until native complex GPU buffers are wired through the runtime."
|
|
24
|
+
},
|
|
25
|
+
"fusion": {
|
|
26
|
+
"elementwise": false,
|
|
27
|
+
"reduction": false,
|
|
28
|
+
"max_inputs": 2,
|
|
29
|
+
"constants": "inline"
|
|
30
|
+
},
|
|
31
|
+
"requires_feature": null,
|
|
32
|
+
"tested": {
|
|
33
|
+
"unit": "builtins::math::elementwise::complex::tests"
|
|
34
|
+
},
|
|
35
|
+
"description": "`z = complex(a, b)` constructs `a + 1i*b` from real-valued inputs. `z = complex(a)` returns `a` using complex storage with a zero imaginary part, and existing complex inputs pass through unchanged.",
|
|
36
|
+
"behaviors": [
|
|
37
|
+
"With two inputs, `a` and `b` must be real numeric values. Complex inputs raise an error.",
|
|
38
|
+
"Two non-scalar inputs must have the same size. If either input is scalar, it expands across the other input.",
|
|
39
|
+
"Integer and logical inputs are promoted to double precision before constructing the complex result.",
|
|
40
|
+
"String and character inputs are rejected because the constructor accepts numeric inputs only.",
|
|
41
|
+
"Unary `complex(a)` preserves existing complex scalars and complex tensors. Real inputs become complex values with zero imaginary parts.",
|
|
42
|
+
"Empty real tensors preserve their empty shape and return empty complex tensors."
|
|
43
|
+
],
|
|
44
|
+
"examples": [
|
|
45
|
+
{
|
|
46
|
+
"description": "Constructing a complex scalar from real and imaginary parts",
|
|
47
|
+
"input": "z = complex(3, 4)",
|
|
48
|
+
"output": "z = 3+4i"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Constructing a complex row vector from matching real arrays",
|
|
52
|
+
"input": "re = [1 2 3];\nim = [4 5 6];\nz = complex(re, im)",
|
|
53
|
+
"output": "z = [1+4i 2+5i 3+6i]"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"description": "Expanding a scalar imaginary part across an array",
|
|
57
|
+
"input": "re = [1 2 3];\nz = complex(re, -1)",
|
|
58
|
+
"output": "z = [1-1i 2-1i 3-1i]"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"description": "Forcing complex storage with a zero imaginary part",
|
|
62
|
+
"input": "z = complex(12);\ntf = isreal(z)",
|
|
63
|
+
"output": "z = 12+0i\n\ntf =\n 0"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"description": "Leaving an existing complex value unchanged",
|
|
67
|
+
"input": "z = complex(1 + 2i)",
|
|
68
|
+
"output": "z = 1+2i"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"description": "Rejecting non-scalar implicit expansion",
|
|
72
|
+
"input": "z = complex([1 2 3], [10; 20])",
|
|
73
|
+
"output": "error: complex: real and imaginary parts must have the same size, unless one input is scalar"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"faqs": [
|
|
77
|
+
{
|
|
78
|
+
"question": "Does `complex(a, b)` use MATLAB implicit expansion?",
|
|
79
|
+
"answer": "Only scalar expansion is supported for this constructor. Two non-scalar operands must have identical sizes, matching MATLAB's documented `complex` size rules."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"question": "Can I pass complex values to `complex(a, b)`?",
|
|
83
|
+
"answer": "No. The two-argument constructor requires real numeric inputs for both the real and imaginary parts. Use `real`, `imag`, or arithmetic if you need to transform existing complex values."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"question": "What does unary `complex(a)` do?",
|
|
87
|
+
"answer": "It forces real input into complex storage with a zero imaginary part. If `a` is already complex, RunMat returns it unchanged."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"question": "Why does `isreal(complex(5))` return false?",
|
|
91
|
+
"answer": "`complex(5)` stores the value as complex double data with an explicit zero imaginary part. MATLAB and RunMat define `isreal` by storage, so it returns `false`."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"question": "Does `complex` accept logical inputs?",
|
|
95
|
+
"answer": "Yes. RunMat promotes logical values to doubles (`true` becomes `1`, `false` becomes `0`) before constructing the complex output."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"question": "Does `complex` accept strings or character arrays?",
|
|
99
|
+
"answer": "No. Strings and character arrays are rejected because the constructor is limited to numeric inputs."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"question": "Can `complex` run on GPU arrays?",
|
|
103
|
+
"answer": "Not yet. RunMat's complex tensor representation is currently host-resident, so this builtin does not accept `gpuArray` inputs."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"links": [
|
|
107
|
+
{
|
|
108
|
+
"label": "real",
|
|
109
|
+
"url": "./real"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"label": "imag",
|
|
113
|
+
"url": "./imag"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"label": "isreal",
|
|
117
|
+
"url": "./isreal"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"label": "conj",
|
|
121
|
+
"url": "./conj"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"label": "angle",
|
|
125
|
+
"url": "./angle"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"label": "abs",
|
|
129
|
+
"url": "./abs"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"label": "double",
|
|
133
|
+
"url": "./double"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"label": "single",
|
|
137
|
+
"url": "./single"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"source": {
|
|
141
|
+
"label": "`crates/runmat-runtime/src/builtins/math/elementwise/complex.rs`",
|
|
142
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/elementwise/complex.rs"
|
|
143
|
+
},
|
|
144
|
+
"gpu_residency": "No. `complex` returns host-resident `Value::Complex` or `Value::ComplexTensor` values today. Use `gather` before construction if values are currently device-resident.",
|
|
145
|
+
"gpu_behavior": [
|
|
146
|
+
"RunMat rejects `gpuArray` inputs for `complex` today because the active GPU providers expose real-valued tensor buffers, while this constructor creates complex storage. Native complex GPU residency can be added later without changing the public call forms."
|
|
147
|
+
],
|
|
148
|
+
"key": "complex",
|
|
149
|
+
"slug": "complex",
|
|
150
|
+
"aliases": [],
|
|
151
|
+
"categoryPath": [
|
|
152
|
+
"math",
|
|
153
|
+
"elementwise"
|
|
154
|
+
]
|
|
155
|
+
};
|
|
156
|
+
export default builtinDoc;
|
|
157
|
+
//# sourceMappingURL=complex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex.js","sourceRoot":"","sources":["../../../src/generated/builtins/complex.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,kBAAkB;IAC9B,UAAU,EAAE;QACV,SAAS;QACT,qBAAqB;QACrB,WAAW;QACX,gBAAgB;QAChB,iBAAiB;QACjB,gBAAgB;KACjB;IACD,SAAS,EAAE,gEAAgE;IAC3E,YAAY,EAAE;QACZ,wDAAwD;KACzD;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,aAAa;QAC7B,OAAO,EAAE,+KAA+K;KACzL;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,6CAA6C;KACtD;IACD,aAAa,EAAE,uMAAuM;IACtN,WAAW,EAAE;QACX,0FAA0F;QAC1F,8GAA8G;QAC9G,qGAAqG;QACrG,+FAA+F;QAC/F,yIAAyI;QACzI,iFAAiF;KAClF;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,6DAA6D;YAC5E,OAAO,EAAE,mBAAmB;YAC5B,QAAQ,EAAE,UAAU;SACrB;QACD;YACE,aAAa,EAAE,6DAA6D;YAC5E,OAAO,EAAE,mDAAmD;YAC5D,QAAQ,EAAE,sBAAsB;SACjC;QACD;YACE,aAAa,EAAE,mDAAmD;YAClE,OAAO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ACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,UAAU;SAClB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,kEAAkE;QAC3E,KAAK,EAAE,+GAA+G;KACvH;IACD,eAAe,EAAE,wKAAwK;IACzL,cAAc,EAAE;QACd,kQAAkQ;KACnQ;IACD,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,aAAa;KACd;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cosd.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/cosd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAwGjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "cosd",
|
|
5
|
+
"category": "math/trigonometry",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"cosd",
|
|
8
|
+
"cosine",
|
|
9
|
+
"degrees",
|
|
10
|
+
"angle",
|
|
11
|
+
"trigonometry",
|
|
12
|
+
"elementwise"
|
|
13
|
+
],
|
|
14
|
+
"summary": "Cosine of angles expressed in degrees with MATLAB-exact values at canonical multiples.",
|
|
15
|
+
"references": [],
|
|
16
|
+
"gpu_support": {
|
|
17
|
+
"elementwise": true,
|
|
18
|
+
"reduction": false,
|
|
19
|
+
"precisions": [
|
|
20
|
+
"f64"
|
|
21
|
+
],
|
|
22
|
+
"broadcasting": "elementwise",
|
|
23
|
+
"notes": "GPU inputs are gathered to the host so the reference implementation can guarantee MATLAB-exact values at canonical multiples of 60, 90, 120, and 180 degrees."
|
|
24
|
+
},
|
|
25
|
+
"fusion": {
|
|
26
|
+
"elementwise": false,
|
|
27
|
+
"reduction": false,
|
|
28
|
+
"max_inputs": 1,
|
|
29
|
+
"constants": "inline",
|
|
30
|
+
"notes": "Fusion is intentionally disabled for v1 because the WGSL `cos(x*pi/180)` form would lose MATLAB's exact-value guarantees at canonical angles."
|
|
31
|
+
},
|
|
32
|
+
"requires_feature": null,
|
|
33
|
+
"tested": {
|
|
34
|
+
"unit": "builtins::math::trigonometry::cosd::tests",
|
|
35
|
+
"integration": null
|
|
36
|
+
},
|
|
37
|
+
"description": "`y = cosd(x)` evaluates the cosine of each angle in `x`, interpreting the values in degrees rather than radians. The implementation reduces the angle modulo 360 and special-cases 0, 60, 90, 120, and 180 (and their negative/wrapped counterparts) so the result matches MATLAB's exact 0, ±0.5, and ±1 values without floating-point noise.",
|
|
38
|
+
"behaviors": [
|
|
39
|
+
"Operates element-wise on scalars, vectors, matrices, and N-D tensors.",
|
|
40
|
+
"Integer and logical inputs are promoted to double precision before evaluation.",
|
|
41
|
+
"Returns exactly 0 at multiples of 90 and exactly ±1 at multiples of 180.",
|
|
42
|
+
"Returns exactly ±0.5 at multiples of 60 and 120.",
|
|
43
|
+
"Complex inputs delegate to the analytic extension of `cos` after scaling by `pi/180`; exact-value treatment for complex operands is deferred.",
|
|
44
|
+
"Output shape matches the input shape; non-finite inputs propagate as `NaN`.",
|
|
45
|
+
"String inputs are unsupported and raise a builtin-scoped error."
|
|
46
|
+
],
|
|
47
|
+
"examples": [
|
|
48
|
+
{
|
|
49
|
+
"description": "Cosine of a canonical degree angle",
|
|
50
|
+
"input": "y = cosd(60)",
|
|
51
|
+
"output": "y = 0.5"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "Cosine of multiples of 90 returns exactly zero",
|
|
55
|
+
"input": "y = cosd([90 270])",
|
|
56
|
+
"output": "y = [0 0]"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"description": "Cosine of a vector of common angles",
|
|
60
|
+
"input": "angles = [0 30 45 60 90];\ny = cosd(angles)",
|
|
61
|
+
"output": "y = [1 0.8660 0.7071 0.5 0]"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"faqs": [
|
|
65
|
+
{
|
|
66
|
+
"question": "Why does `cosd(90)` return exactly zero?",
|
|
67
|
+
"answer": "MATLAB guarantees an exact zero at multiples of 90 to avoid floating-point noise from `pi`. RunMat reduces the angle modulo 360 and short-circuits the canonical cases before delegating to `cos`."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"question": "Is `cosd(x)` equivalent to `cos(x*pi/180)`?",
|
|
71
|
+
"answer": "Mathematically yes, but the floating-point result differs at canonical angles because `pi/180` is not exact in binary floating point. `cosd` returns the exact MATLAB values at multiples of 60, 90, 120, and 180."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"question": "Does `cosd` support arrays?",
|
|
75
|
+
"answer": "Yes. Scalars, vectors, matrices, and N-D tensors are all handled element-wise; the shape of the input is preserved."
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"links": [
|
|
79
|
+
{
|
|
80
|
+
"label": "sind",
|
|
81
|
+
"url": "./sind"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"label": "tand",
|
|
85
|
+
"url": "./tand"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"label": "cos",
|
|
89
|
+
"url": "./cos"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"label": "deg2rad",
|
|
93
|
+
"url": "./deg2rad"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"source": {
|
|
97
|
+
"label": "`crates/runmat-runtime/src/builtins/math/trigonometry/cosd.rs`",
|
|
98
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/trigonometry/cosd.rs"
|
|
99
|
+
},
|
|
100
|
+
"key": "cosd",
|
|
101
|
+
"slug": "cosd",
|
|
102
|
+
"aliases": [],
|
|
103
|
+
"categoryPath": [
|
|
104
|
+
"math",
|
|
105
|
+
"trigonometry"
|
|
106
|
+
]
|
|
107
|
+
};
|
|
108
|
+
export default builtinDoc;
|
|
109
|
+
//# sourceMappingURL=cosd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cosd.js","sourceRoot":"","sources":["../../../src/generated/builtins/cosd.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,mBAAmB;IAC/B,UAAU,EAAE;QACV,MAAM;QACN,QAAQ;QACR,SAAS;QACT,OAAO;QACP,cAAc;QACd,aAAa;KACd;IACD,SAAS,EAAE,wFAAwF;IACnG,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE;YACZ,KAAK;SACN;QACD,cAAc,EAAE,aAAa;QAC7B,OAAO,EAAE,+JAA+J;KACzK;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE,+IAA+I;KACzJ;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,2CAA2C;QACnD,aAAa,EAAE,IAAI;KACpB;IACD,aAAa,EAAE,gVAAgV;IAC/V,WAAW,EAAE;QACX,uEAAuE;QACvE,gFAAgF;QAChF,0EAA0E;QAC1E,kDAAkD;QAClD,+IAA+I;QAC/I,6EAA6E;QAC7E,iEAAiE;KAClE;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,oCAAoC;YACnD,OAAO,EAAE,cAAc;YACvB,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,aAAa,EAAE,gDAAgD;YAC/D,OAAO,EAAE,oBAAoB;YAC7B,QAAQ,EAAE,WAAW;SACtB;QACD;YACE,aAAa,EAAE,qCAAqC;YACpD,OAAO,EAAE,6CAA6C;YACtD,QAAQ,EAAE,6BAA6B;SACxC;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,0CAA0C;YACtD,QAAQ,EAAE,oMAAoM;SAC/M;QACD;YACE,UAAU,EAAE,6CAA6C;YACzD,QAAQ,EAAE,oNAAoN;SAC/N;QACD;YACE,UAAU,EAAE,6BAA6B;YACzC,QAAQ,EAAE,qHAAqH;SAChI;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;QACD;YACE,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,WAAW;SACnB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,gEAAgE;QACzE,KAAK,EAAE,6GAA6G;KACrH;IACD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,cAAc;KACf;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/db.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAqHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "db",
|
|
5
|
+
"category": "control",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"db",
|
|
8
|
+
"decibel",
|
|
9
|
+
"voltage",
|
|
10
|
+
"power",
|
|
11
|
+
"resistance",
|
|
12
|
+
"complex"
|
|
13
|
+
],
|
|
14
|
+
"summary": "Convert numeric values to decibels using MATLAB-compatible voltage, power, or resistance forms.",
|
|
15
|
+
"references": [],
|
|
16
|
+
"gpu_support": {
|
|
17
|
+
"elementwise": false,
|
|
18
|
+
"reduction": false,
|
|
19
|
+
"precisions": [],
|
|
20
|
+
"broadcasting": "matlab",
|
|
21
|
+
"notes": "gpuArray inputs are gathered to the host before conversion. No provider-level GPU kernel is required for this compound builtin."
|
|
22
|
+
},
|
|
23
|
+
"fusion": {
|
|
24
|
+
"elementwise": false,
|
|
25
|
+
"reduction": false,
|
|
26
|
+
"max_inputs": 0,
|
|
27
|
+
"constants": "inline",
|
|
28
|
+
"notes": "`db` parses optional string modes and resistance values, so it executes as a host-side fusion boundary."
|
|
29
|
+
},
|
|
30
|
+
"requires_feature": null,
|
|
31
|
+
"tested": {
|
|
32
|
+
"unit": "builtins::control::db::tests"
|
|
33
|
+
},
|
|
34
|
+
"description": "`Y = db(X)` converts magnitudes to decibels with `20*log10(abs(X))`. `db(X, 'power')` uses `10*log10(abs(X))`, and `db(X, R)` treats `X` as voltage across resistance `R` and returns `10*log10(abs(X).^2 ./ R)`.",
|
|
35
|
+
"behaviors": [
|
|
36
|
+
"`db(X)` and `db(X, 'voltage')` compute voltage-style decibels with `20*log10(abs(X))`.",
|
|
37
|
+
"`db(X, 'power')` computes power-style decibels with `10*log10(abs(X))`.",
|
|
38
|
+
"`db(X, R)` computes power through a finite positive resistance with `10*log10(abs(X).^2 ./ R)`.",
|
|
39
|
+
"Complex inputs are converted through their magnitude before applying the decibel formula.",
|
|
40
|
+
"The resistance form supports MATLAB implicit expansion between `X` and `R`.",
|
|
41
|
+
"Zero input returns `-Inf`, matching the logarithm singularity at zero.",
|
|
42
|
+
"Integer and logical inputs are promoted to double precision."
|
|
43
|
+
],
|
|
44
|
+
"examples": [
|
|
45
|
+
{
|
|
46
|
+
"description": "Voltage-style decibel conversion",
|
|
47
|
+
"input": "y = db(10)",
|
|
48
|
+
"output": "y = 20"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Power-style decibel conversion",
|
|
52
|
+
"input": "p = db(100, 'power')",
|
|
53
|
+
"output": "p = 20"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"description": "Voltage across a reference resistance",
|
|
57
|
+
"input": "p = db(10, 50)",
|
|
58
|
+
"output": "p = 3.0103"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"description": "Complex magnitude conversion",
|
|
62
|
+
"input": "z = db(3 + 4i)",
|
|
63
|
+
"output": "z = 13.9794"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"faqs": [
|
|
67
|
+
{
|
|
68
|
+
"question": "What is the default mode?",
|
|
69
|
+
"answer": "The default is voltage mode, equivalent to `db(X, 'voltage')`."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"question": "How does `db` handle complex values?",
|
|
73
|
+
"answer": "RunMat first computes `abs(X)` and then applies the selected decibel formula, so complex outputs are not produced."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"question": "What happens for zero input?",
|
|
77
|
+
"answer": "`db(0)` returns `-Inf` because `log10(0)` is negative infinity."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"question": "Can resistance be an array?",
|
|
81
|
+
"answer": "Yes. The resistance form broadcasts `X` and `R` using MATLAB implicit expansion. Resistance values must be finite and positive."
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"links": [
|
|
85
|
+
{
|
|
86
|
+
"label": "abs",
|
|
87
|
+
"url": "./abs"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"label": "log10",
|
|
91
|
+
"url": "./log10"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"label": "tf",
|
|
95
|
+
"url": "./tf"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"source": {
|
|
99
|
+
"label": "`crates/runmat-runtime/src/builtins/control/db.rs`",
|
|
100
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/db.rs"
|
|
101
|
+
},
|
|
102
|
+
"syntax": {
|
|
103
|
+
"example": {
|
|
104
|
+
"description": "Supported forms",
|
|
105
|
+
"input": "Y = db(X)\nY = db(X, 'voltage')\nY = db(X, 'power')\nY = db(X, R)",
|
|
106
|
+
"output": "Y is a real double scalar or array."
|
|
107
|
+
},
|
|
108
|
+
"points": [
|
|
109
|
+
"`X` may be real or complex numeric data.",
|
|
110
|
+
"`R` is a finite positive real numeric scalar or array.",
|
|
111
|
+
"The output shape follows `X` for mode arguments and the broadcasted shape of `X` and `R` for the resistance form."
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"key": "db",
|
|
115
|
+
"slug": "db",
|
|
116
|
+
"aliases": [],
|
|
117
|
+
"categoryPath": [
|
|
118
|
+
"control"
|
|
119
|
+
]
|
|
120
|
+
};
|
|
121
|
+
export default builtinDoc;
|
|
122
|
+
//# sourceMappingURL=db.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../../src/generated/builtins/db.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,IAAI;QACJ,SAAS;QACT,SAAS;QACT,OAAO;QACP,YAAY;QACZ,SAAS;KACV;IACD,SAAS,EAAE,iGAAiG;IAC5G,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,QAAQ;QACxB,OAAO,EAAE,iIAAiI;KAC3I;IACD,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AAE;QACR,OAAO,EAAE,oDAAoD;QAC7D,KAAK,EAAE,iGAAiG;KACzG;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE,mEAAmE;YAC5E,QAAQ,EAAE,qCAAqC;SAChD;QACD,QAAQ,EAAE;YACR,0CAA0C;YAC1C,wDAAwD;YACxD,mHAAmH;SACpH;KACF;IACD,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,SAAS;KACV;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill3.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/fill3.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAmJjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "fill3",
|
|
5
|
+
"category": "plotting",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"fill3",
|
|
8
|
+
"3-D filled polygon",
|
|
9
|
+
"patch",
|
|
10
|
+
"polygon",
|
|
11
|
+
"matlab fill3",
|
|
12
|
+
"3d patch"
|
|
13
|
+
],
|
|
14
|
+
"summary": "Create MATLAB-compatible filled polygon patches in 3-D space.",
|
|
15
|
+
"gpu_support": {
|
|
16
|
+
"elementwise": false,
|
|
17
|
+
"reduction": false,
|
|
18
|
+
"precisions": [
|
|
19
|
+
"single",
|
|
20
|
+
"double"
|
|
21
|
+
],
|
|
22
|
+
"broadcasting": "none",
|
|
23
|
+
"notes": "`fill3` is a plotting sink. It lowers coordinate and color argument groups to `patch` objects, gathering GPU-resident coordinate inputs through the shared patch path."
|
|
24
|
+
},
|
|
25
|
+
"fusion": {
|
|
26
|
+
"elementwise": false,
|
|
27
|
+
"reduction": false,
|
|
28
|
+
"max_inputs": 4,
|
|
29
|
+
"constants": "inline"
|
|
30
|
+
},
|
|
31
|
+
"requires_feature": null,
|
|
32
|
+
"tested": {
|
|
33
|
+
"unit": "builtins::plotting::fill3::tests"
|
|
34
|
+
},
|
|
35
|
+
"description": "`fill3` creates filled polygon graphics objects from X, Y, and Z coordinate data. RunMat implements it as a thin wrapper over the shared `patch` machinery, so returned handles are patch graphics handles and common patch name-value properties apply.",
|
|
36
|
+
"behaviors": [
|
|
37
|
+
"`fill3(X, Y, Z, C)` creates one or more 3-D filled polygons from matching coordinate arrays.",
|
|
38
|
+
"Vector coordinate inputs create one polygon.",
|
|
39
|
+
"Matrix coordinate inputs create one polygon per column through the underlying `patch` parser.",
|
|
40
|
+
"Multiple `X,Y,Z,C` groups in one call create multiple patch objects and return a row vector of patch handles.",
|
|
41
|
+
"A single polygon group returns a scalar patch handle.",
|
|
42
|
+
"`fill3` initializes the target axes with the standard 3-D view, so even polygons in the z=0 plane render as 3-D patch content.",
|
|
43
|
+
"Trailing patch property name-value pairs are applied to every polygon group in the call.",
|
|
44
|
+
"The returned patch handles work with `get`, `set`, `ishandle`, and `isgraphics`.",
|
|
45
|
+
"Color strings and RGB triples are supported through the shared patch color parser.",
|
|
46
|
+
"Indexed or interpolated CData behavior is currently limited by the underlying `patch` implementation; concrete color strings, RGB triples, and common patch properties are the supported color path."
|
|
47
|
+
],
|
|
48
|
+
"options": [
|
|
49
|
+
"`FaceColor` accepts color names, RGB triples, `flat`, or `none` through `patch`.",
|
|
50
|
+
"`EdgeColor` accepts color names, RGB triples, or `none`.",
|
|
51
|
+
"`FaceAlpha` and `EdgeAlpha` accept numeric values from 0 to 1.",
|
|
52
|
+
"`LineWidth`, `DisplayName`, and `Visible` use the shared plotting property model.",
|
|
53
|
+
"Explicit axes handles are accepted as the leading argument, matching other RunMat plotting builtins."
|
|
54
|
+
],
|
|
55
|
+
"examples": [
|
|
56
|
+
{
|
|
57
|
+
"description": "Create a red square in the z=0 plane",
|
|
58
|
+
"input": "x = [0 1 1 0];\ny = [0 0 1 1];\nz = [0 0 0 0];\nh = fill3(x, y, z, 'r');\nget(h, 'Type')",
|
|
59
|
+
"output": "ans =\n 'patch'"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"description": "Create two filled polygons in one call",
|
|
63
|
+
"input": "x1 = [0 1 0];\ny1 = [0 0 1];\nz1 = [0 0 0];\nx2 = [2 3 3 2];\ny2 = [0 0 1 1];\nz2 = [1 1 1 1];\nh = fill3(x1, y1, z1, 'g', x2, y2, z2, [0 0 1]);"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"description": "Apply patch properties to a fill3 polygon",
|
|
67
|
+
"input": "x = [0 1 0];\ny = [0 0 1];\nz = [0.25 0.5 0.75];\nh = fill3(x, y, z, [0.25 0.5 0.75], 'EdgeColor', 'none', 'FaceAlpha', 0.5);"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"description": "Create one patch per matrix column",
|
|
71
|
+
"input": "X = [0 2; 1 3; 1 3; 0 2];\nY = [0 0; 0 0; 1 1; 1 1];\nZ = [0 1; 0 1; 0 1; 0 1];\nfill3(X, Y, Z, 'cyan');\nview(3);"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"faqs": [
|
|
75
|
+
{
|
|
76
|
+
"question": "What does fill3 return?",
|
|
77
|
+
"answer": "`fill3` returns patch graphics handles. A single polygon group returns one scalar handle; multiple groups return a row vector of handles."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"question": "How is fill3 related to patch?",
|
|
81
|
+
"answer": "`fill3` lowers its positional `X,Y,Z,C` inputs into the same `patch` object machinery. This keeps geometry validation, color parsing, property handling, rendering, and handle behavior consistent with `patch`."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"question": "Can I pass patch properties to fill3?",
|
|
85
|
+
"answer": "Yes. Trailing name-value pairs such as `'EdgeColor', 'none'`, `'FaceAlpha', 0.5`, and `'LineWidth', 2` are forwarded to the patch objects created by `fill3`."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"question": "Does fill3 support GPU-resident inputs?",
|
|
89
|
+
"answer": "GPU-resident coordinate inputs are gathered through the shared patch path for validation and polygon construction, then the resulting geometry is rendered through RunMat's GPU plotting renderer."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"question": "Does fill3 support indexed CData?",
|
|
93
|
+
"answer": "The current implementation is constrained by `patch`: color strings and RGB triples are supported, while full MATLAB indexed/interpolated CData behavior is deferred."
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"links": [
|
|
97
|
+
{
|
|
98
|
+
"label": "patch",
|
|
99
|
+
"url": "./patch"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"label": "plot3",
|
|
103
|
+
"url": "./plot3"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"label": "scatter3",
|
|
107
|
+
"url": "./scatter3"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"label": "surf",
|
|
111
|
+
"url": "./surf"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"label": "view",
|
|
115
|
+
"url": "./view"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"label": "get",
|
|
119
|
+
"url": "./get"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"label": "set",
|
|
123
|
+
"url": "./set"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"label": "Graphics Handles",
|
|
127
|
+
"url": "/docs/plotting/graphics-handles"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"label": "Plot replay and export",
|
|
131
|
+
"url": "/docs/plotting/plot-replay-and-export"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"source": {
|
|
135
|
+
"label": "`crates/runmat-runtime/src/builtins/plotting/ops/fill3.rs`",
|
|
136
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/plotting/ops/fill3.rs"
|
|
137
|
+
},
|
|
138
|
+
"gpu_residency": "`fill3` is a plotting sink and fusion barrier. GPU-resident coordinate inputs are gathered before patch construction because MATLAB-compatible parsing requires shape validation and polygon assembly.",
|
|
139
|
+
"gpu_behavior": [
|
|
140
|
+
"`fill3` shares patch rendering behavior, so host and gathered-GPU coordinate inputs produce the same patch objects and graphics handles.",
|
|
141
|
+
"Rendered geometry flows through the shared GPU plotting renderer after the patch objects are built.",
|
|
142
|
+
"A future direct GPU path should preserve the same `X,Y,Z,C` grouping and patch property semantics while replacing only the coordinate gathering and geometry packing stage."
|
|
143
|
+
],
|
|
144
|
+
"key": "fill3",
|
|
145
|
+
"slug": "fill3",
|
|
146
|
+
"aliases": [],
|
|
147
|
+
"categoryPath": [
|
|
148
|
+
"plotting"
|
|
149
|
+
]
|
|
150
|
+
};
|
|
151
|
+
export default builtinDoc;
|
|
152
|
+
//# sourceMappingURL=fill3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill3.js","sourceRoot":"","sources":["../../../src/generated/builtins/fill3.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE;QACV,OAAO;QACP,oBAAoB;QACpB,OAAO;QACP,SAAS;QACT,cAAc;QACd,UAAU;KACX;IACD,SAAS,EAAE,+DAA+D;IAC1E,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE;YACZ,QAAQ;YACR,QAAQ;SACT;QACD,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,wKAAwK;KAClL;IACD,QAAQ,EAAE;QACR,aAAa,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AE,SAAS;SACjB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;QACD;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;QACD;YACE,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,iCAAiC;SACzC;QACD;YACE,OAAO,EAAE,wBAAwB;YACjC,KAAK,EAAE,uCAAuC;SAC/C;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,4DAA4D;QACrE,KAAK,EAAE,yGAAyG;KACjH;IACD,eAAe,EAAE,wMAAwM;IACzN,cAAc,EAAE;QACd,0IAA0I;QAC1I,qGAAqG;QACrG,6KAA6K;KAC9K;IACD,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,UAAU;KACX;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fminbnd.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/fminbnd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAmGjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|