runmat 0.4.9-dev.1 → 0.4.9

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.
Files changed (94) hide show
  1. package/artifacts/stdlib.snapshot +0 -0
  2. package/dist/builtins.d.ts +1 -0
  3. package/dist/builtins.d.ts.map +1 -1
  4. package/dist/builtins.js.map +1 -1
  5. package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
  6. package/dist/generated/builtin-examples-catalog.js +1 -1
  7. package/dist/generated/builtin-examples-catalog.js.map +1 -1
  8. package/dist/generated/builtins/complex.d.ts +4 -0
  9. package/dist/generated/builtins/complex.d.ts.map +1 -0
  10. package/dist/generated/builtins/complex.js +157 -0
  11. package/dist/generated/builtins/complex.js.map +1 -0
  12. package/dist/generated/builtins/cosd.d.ts +4 -0
  13. package/dist/generated/builtins/cosd.d.ts.map +1 -0
  14. package/dist/generated/builtins/cosd.js +109 -0
  15. package/dist/generated/builtins/cosd.js.map +1 -0
  16. package/dist/generated/builtins/db.d.ts +4 -0
  17. package/dist/generated/builtins/db.d.ts.map +1 -0
  18. package/dist/generated/builtins/db.js +122 -0
  19. package/dist/generated/builtins/db.js.map +1 -0
  20. package/dist/generated/builtins/fgetl.d.ts +4 -0
  21. package/dist/generated/builtins/fgetl.d.ts.map +1 -0
  22. package/dist/generated/builtins/fgetl.js +133 -0
  23. package/dist/generated/builtins/fgetl.js.map +1 -0
  24. package/dist/generated/builtins/fgets.d.ts.map +1 -1
  25. package/dist/generated/builtins/fgets.js +4 -0
  26. package/dist/generated/builtins/fgets.js.map +1 -1
  27. package/dist/generated/builtins/fill3.d.ts +4 -0
  28. package/dist/generated/builtins/fill3.d.ts.map +1 -0
  29. package/dist/generated/builtins/fill3.js +152 -0
  30. package/dist/generated/builtins/fill3.js.map +1 -0
  31. package/dist/generated/builtins/fminbnd.d.ts +4 -0
  32. package/dist/generated/builtins/fminbnd.d.ts.map +1 -0
  33. package/dist/generated/builtins/fminbnd.js +104 -0
  34. package/dist/generated/builtins/fminbnd.js.map +1 -0
  35. package/dist/generated/builtins/impulse.d.ts +4 -0
  36. package/dist/generated/builtins/impulse.d.ts.map +1 -0
  37. package/dist/generated/builtins/impulse.js +123 -0
  38. package/dist/generated/builtins/impulse.js.map +1 -0
  39. package/dist/generated/builtins/integral.d.ts +4 -0
  40. package/dist/generated/builtins/integral.d.ts.map +1 -0
  41. package/dist/generated/builtins/integral.js +101 -0
  42. package/dist/generated/builtins/integral.js.map +1 -0
  43. package/dist/generated/builtins/mode.d.ts +4 -0
  44. package/dist/generated/builtins/mode.d.ts.map +1 -0
  45. package/dist/generated/builtins/mode.js +146 -0
  46. package/dist/generated/builtins/mode.js.map +1 -0
  47. package/dist/generated/builtins/optimset.d.ts.map +1 -1
  48. package/dist/generated/builtins/optimset.js +8 -4
  49. package/dist/generated/builtins/optimset.js.map +1 -1
  50. package/dist/generated/builtins/patch.d.ts +4 -0
  51. package/dist/generated/builtins/patch.d.ts.map +1 -0
  52. package/dist/generated/builtins/patch.js +135 -0
  53. package/dist/generated/builtins/patch.js.map +1 -0
  54. package/dist/generated/builtins/repelem.d.ts +4 -0
  55. package/dist/generated/builtins/repelem.d.ts.map +1 -0
  56. package/dist/generated/builtins/repelem.js +135 -0
  57. package/dist/generated/builtins/repelem.js.map +1 -0
  58. package/dist/generated/builtins/sawtooth.d.ts +4 -0
  59. package/dist/generated/builtins/sawtooth.d.ts.map +1 -0
  60. package/dist/generated/builtins/sawtooth.js +111 -0
  61. package/dist/generated/builtins/sawtooth.js.map +1 -0
  62. package/dist/generated/builtins/sinc.d.ts +4 -0
  63. package/dist/generated/builtins/sinc.d.ts.map +1 -0
  64. package/dist/generated/builtins/sinc.js +142 -0
  65. package/dist/generated/builtins/sinc.js.map +1 -0
  66. package/dist/generated/builtins/sind.d.ts +4 -0
  67. package/dist/generated/builtins/sind.d.ts.map +1 -0
  68. package/dist/generated/builtins/sind.js +109 -0
  69. package/dist/generated/builtins/sind.js.map +1 -0
  70. package/dist/generated/builtins/square.d.ts +4 -0
  71. package/dist/generated/builtins/square.d.ts.map +1 -0
  72. package/dist/generated/builtins/square.js +110 -0
  73. package/dist/generated/builtins/square.js.map +1 -0
  74. package/dist/generated/builtins/step.d.ts +4 -0
  75. package/dist/generated/builtins/step.d.ts.map +1 -0
  76. package/dist/generated/builtins/step.js +125 -0
  77. package/dist/generated/builtins/step.js.map +1 -0
  78. package/dist/generated/builtins/tand.d.ts +4 -0
  79. package/dist/generated/builtins/tand.d.ts.map +1 -0
  80. package/dist/generated/builtins/tand.js +109 -0
  81. package/dist/generated/builtins/tand.js.map +1 -0
  82. package/dist/generated/builtins-manifest.d.ts.map +1 -1
  83. package/dist/generated/builtins-manifest.js +363 -1
  84. package/dist/generated/builtins-manifest.js.map +1 -1
  85. package/dist/lsp/runmat_lsp.d.ts +2 -2
  86. package/dist/lsp/runmat_lsp.js +4 -4
  87. package/dist/lsp/runmat_lsp_bg.wasm +0 -0
  88. package/dist/lsp/runmat_lsp_bg.wasm.d.ts +2 -2
  89. package/dist/pkg-web/runmat_wasm_web.d.ts +42 -42
  90. package/dist/pkg-web/runmat_wasm_web.js +85 -85
  91. package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
  92. package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +35 -35
  93. package/dist/runtime/stdlib.snapshot +0 -0
  94. package/package.json +1 -1
@@ -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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,QAAQ,EAAE,kNAAkN;SAC7N;QACD;YACE,UAAU,EAAE,uCAAuC;YACnD,QAAQ,EAAE,+JAA+J;SAC1K;QACD;YACE,UAAU,EAAE,yCAAyC;YACrD,QAAQ,EAAE,oMAAoM;SAC/M;QACD;YACE,UAAU,EAAE,mCAAmC;YAC/C,QAAQ,EAAE,uKAAuK;SAClL;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;QACD;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,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,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=fminbnd.d.ts.map
@@ -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"}
@@ -0,0 +1,104 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "fminbnd",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "fminbnd",
8
+ "bounded minimization",
9
+ "brent",
10
+ "golden section",
11
+ "parabolic interpolation",
12
+ "optimization"
13
+ ],
14
+ "summary": "Find a local minimum of a scalar function on a bounded interval using Brent's method.",
15
+ "references": [
16
+ "https://www.mathworks.com/help/matlab/ref/fminbnd.html"
17
+ ],
18
+ "gpu_support": {
19
+ "elementwise": false,
20
+ "reduction": false,
21
+ "precisions": [],
22
+ "broadcasting": "none",
23
+ "notes": "The solver runs on the host. Callback functions may still call GPU-aware builtins."
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::math::optim::fminbnd::tests",
34
+ "integration": "runmat-vm/tests/closures.rs::fminbnd_accepts_anonymous_function"
35
+ },
36
+ "description": "`x = fminbnd(fun, x1, x2)` searches the closed interval `[x1, x2]` for a local minimum of the scalar function `fun` using Brent's method (golden-section search combined with parabolic interpolation). Additional output arities expose the function value at the minimum, an exit flag, and a diagnostic struct.",
37
+ "behaviors": [
38
+ "The function handle must return a finite real scalar for every sampled point in the interval.",
39
+ "If `x1 > x2`, the bounds are inconsistent and `exitflag = -2`.",
40
+ "If `x1 == x2`, that point is returned with `exitflag = 1`.",
41
+ "Options are supplied as a struct, usually built with `optimset`. `TolX`, `MaxIter`, `MaxFunEvals`, and `Display` are accepted.",
42
+ "`Display` may be `'off'`, `'iter'`, `'notify'` (default; only prints when the solver fails to converge), or `'final'`.",
43
+ "`exitflag` is `1` on convergence within `TolX`, `0` when the iteration or evaluation budget is exhausted.",
44
+ "The fourth output is a struct with `iterations`, `funcCount`, `algorithm`, and `message` fields."
45
+ ],
46
+ "examples": [
47
+ {
48
+ "description": "Minimize a quadratic",
49
+ "input": "x = fminbnd(@(x) (x-2).^2, 0, 5)",
50
+ "output": "x =\n 2.0000"
51
+ },
52
+ {
53
+ "description": "Capture the function value too",
54
+ "input": "[x, fval] = fminbnd(@(x) (x-3).^2 + 1, 0, 5)",
55
+ "output": "x =\n 3.0000\nfval =\n 1.0000"
56
+ },
57
+ {
58
+ "description": "Tighten tolerances",
59
+ "input": "opts = optimset('TolX', 1e-10, 'Display', 'off');\n[x, fval, exitflag] = fminbnd(@cos, 0, pi, opts)",
60
+ "output": "x =\n 3.1416\nfval =\n -1.0000\nexitflag =\n 1"
61
+ }
62
+ ],
63
+ "faqs": [
64
+ {
65
+ "question": "Does fminbnd support unbounded minimization?",
66
+ "answer": "No. `fminbnd` requires finite scalar bounds. Use `fminunc` or `fminsearch` for unconstrained problems."
67
+ },
68
+ {
69
+ "question": "Can I retrieve the iteration history?",
70
+ "answer": "Yes — request the four-output form `[x, fval, exitflag, output] = fminbnd(...)` to receive a struct with `iterations`, `funcCount`, `algorithm`, and `message`."
71
+ },
72
+ {
73
+ "question": "Does fminbnd guarantee a global minimum?",
74
+ "answer": "No. Brent's method converges to a local minimum on `[x1, x2]`. For multi-modal functions, narrow the interval to bracket the desired minimum."
75
+ }
76
+ ],
77
+ "links": [
78
+ {
79
+ "label": "fzero",
80
+ "url": "./fzero"
81
+ },
82
+ {
83
+ "label": "fsolve",
84
+ "url": "./fsolve"
85
+ },
86
+ {
87
+ "label": "optimset",
88
+ "url": "./optimset"
89
+ }
90
+ ],
91
+ "source": {
92
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/fminbnd.rs`",
93
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/fminbnd.rs"
94
+ },
95
+ "key": "fminbnd",
96
+ "slug": "fminbnd",
97
+ "aliases": [],
98
+ "categoryPath": [
99
+ "math",
100
+ "optim"
101
+ ]
102
+ };
103
+ export default builtinDoc;
104
+ //# sourceMappingURL=fminbnd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fminbnd.js","sourceRoot":"","sources":["../../../src/generated/builtins/fminbnd.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE;QACV,SAAS;QACT,sBAAsB;QACtB,OAAO;QACP,gBAAgB;QAChB,yBAAyB;QACzB,cAAc;KACf;IACD,SAAS,EAAE,uFAAuF;IAClG,YAAY,EAAE;QACZ,wDAAwD;KACzD;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,oFAAoF;KAC9F;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,uCAAuC;QAC/C,aAAa,EAAE,iEAAiE;KACjF;IACD,aAAa,EAAE,oTAAoT;IACnU,WAAW,EAAE;QACX,+FAA+F;QAC/F,gEAAgE;QAChE,4DAA4D;QAC5D,gIAAgI;QAChI,wHAAwH;QACxH,2GAA2G;QAC3G,kGAAkG;KACnG;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,sBAAsB;YACrC,OAAO,EAAE,kCAAkC;YAC3C,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,aAAa,EAAE,gCAAgC;YAC/C,OAAO,EAAE,8CAA8C;YACvD,QAAQ,EAAE,qCAAqC;SAChD;QACD;YACE,aAAa,EAAE,oBAAoB;YACnC,OAAO,EAAE,qGAAqG;YAC9G,QAAQ,EAAE,yDAAyD;SACpE;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,8CAA8C;YAC1D,QAAQ,EAAE,wGAAwG;SACnH;QACD;YACE,UAAU,EAAE,uCAAuC;YACnD,QAAQ,EAAE,iKAAiK;SAC5K;QACD;YACE,UAAU,EAAE,0CAA0C;YACtD,QAAQ,EAAE,+IAA+I;SAC1J;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;QACD;YACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,UAAU;SAClB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,4DAA4D;QACrE,KAAK,EAAE,yGAAyG;KACjH;IACD,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,OAAO;KACR;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=impulse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impulse.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/impulse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAsHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,123 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "impulse",
5
+ "category": "control",
6
+ "keywords": [
7
+ "impulse",
8
+ "impulse response",
9
+ "control system",
10
+ "transfer function",
11
+ "tf"
12
+ ],
13
+ "summary": "Compute or plot the impulse response of supported dynamic system models.",
14
+ "references": [
15
+ "title: \"MATLAB impulse documentation\"",
16
+ "title: \"Octave control package impulse documentation\""
17
+ ],
18
+ "gpu_support": {
19
+ "elementwise": false,
20
+ "reduction": false,
21
+ "precisions": [],
22
+ "broadcasting": "none",
23
+ "notes": "`impulse` evaluates host-side control-system metadata and returns host-resident response vectors."
24
+ },
25
+ "fusion": {
26
+ "elementwise": false,
27
+ "reduction": false,
28
+ "max_inputs": 0,
29
+ "constants": "inline",
30
+ "notes": "`impulse` simulates a dynamic system response and terminates fusion chains."
31
+ },
32
+ "requires_feature": null,
33
+ "tested": {
34
+ "unit": "builtins::control::impulse::tests",
35
+ "integration": "crates/runmat-vm/tests/control.rs"
36
+ },
37
+ "description": "`impulse(sys)` computes the impulse response for real, strictly proper, scalar-input scalar-output `tf` objects. With output arguments it returns numeric response data; when called in a no-output context and plotting is available, it plots the response.",
38
+ "behaviors": [
39
+ "Supports real SISO `tf` objects created by `tf(num, den)` or `tf(num, den, Ts)`.",
40
+ "`impulse(sys)` uses a deterministic default time vector.",
41
+ "`impulse(sys, tFinal)` generates a deterministic time vector from zero to `tFinal`.",
42
+ "`impulse(sys, t)` respects an explicit real, finite, non-negative, strictly increasing time vector.",
43
+ "`[y, t] = impulse(...)` returns `y` and `t` as `N x 1` column vectors for supported SISO systems.",
44
+ "Continuous-time responses are evaluated from a controllable canonical state-space realization.",
45
+ "Discrete-time responses respect MATLAB's unit-area impulse convention: the input pulse has height `1/Ts`, and time vectors must use integer multiples of `Ts`.",
46
+ "Unsupported model classes, delays, complex coefficients, static gains, and non-strictly-proper transfer functions raise clear diagnostics."
47
+ ],
48
+ "examples": [
49
+ {
50
+ "description": "Compute a first-order impulse response",
51
+ "input": "H = tf(20, [1 5]);\nt = 0:0.1:1;\n[y, tout] = impulse(H, t);",
52
+ "output": "y and tout are column vectors."
53
+ },
54
+ {
55
+ "description": "Plot an impulse response",
56
+ "input": "H = tf(1, [1 3 2]);\nimpulse(H);"
57
+ },
58
+ {
59
+ "description": "Discrete-time impulse response",
60
+ "input": "H = tf(1, [1 -0.5], 0.1);\n[y, t] = impulse(H, 0:0.1:0.5);"
61
+ }
62
+ ],
63
+ "faqs": [
64
+ {
65
+ "question": "Does `impulse` support MIMO systems?",
66
+ "answer": "Not yet. The current implementation supports real SISO `tf` objects. Broader model-family and MIMO support is tracked separately."
67
+ },
68
+ {
69
+ "question": "Why are non-strictly-proper transfer functions rejected?",
70
+ "answer": "Those systems include a direct impulse term that is not represented as a finite numeric response vector in the current runtime model."
71
+ },
72
+ {
73
+ "question": "Can I use state-space or zero-pole-gain models?",
74
+ "answer": "Not yet. `ss`, `zpk`, `frd`, model arrays, and identified-system families are outside this first implementation."
75
+ }
76
+ ],
77
+ "links": [
78
+ {
79
+ "label": "tf",
80
+ "url": "./tf"
81
+ },
82
+ {
83
+ "label": "plot",
84
+ "url": "./plot"
85
+ },
86
+ {
87
+ "label": "stem",
88
+ "url": "./stem"
89
+ }
90
+ ],
91
+ "source": {
92
+ "label": "`crates/runmat-runtime/src/builtins/control/impulse.rs`",
93
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/impulse.rs"
94
+ },
95
+ "syntax": {
96
+ "example": {
97
+ "description": "Supported forms",
98
+ "input": "impulse(sys)\ny = impulse(sys)\n[y, t] = impulse(sys)\n[y, t] = impulse(sys, tFinal)\n[y, t] = impulse(sys, t)",
99
+ "output": "Response data is returned when outputs are requested; otherwise a plot is produced when plotting support is available."
100
+ },
101
+ "points": [
102
+ "`sys` must currently be a real, strictly proper SISO `tf` object.",
103
+ "`tFinal` must be a finite non-negative scalar.",
104
+ "`t` must be a real vector of finite non-negative strictly increasing times. For discrete systems, values must be integer multiples of `sys.Ts`."
105
+ ]
106
+ },
107
+ "validation": {
108
+ "summary": "`impulse` validates the model class, coefficient type and shape, delay properties, strict properness, sample time, and time vector before simulation. Tests cover SISO continuous response values, discrete response values, explicit time input, multi-output shapes, and representative diagnostics.",
109
+ "implementation": {
110
+ "label": "`crates/runmat-runtime/src/builtins/control/impulse.rs`",
111
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/impulse.rs"
112
+ }
113
+ },
114
+ "gpu_residency": "`impulse` returns host-resident response vectors. It does not preserve gpuArray residency.",
115
+ "key": "impulse",
116
+ "slug": "impulse",
117
+ "aliases": [],
118
+ "categoryPath": [
119
+ "control"
120
+ ]
121
+ };
122
+ export default builtinDoc;
123
+ //# sourceMappingURL=impulse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impulse.js","sourceRoot":"","sources":["../../../src/generated/builtins/impulse.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,SAAS;QACT,kBAAkB;QAClB,gBAAgB;QAChB,mBAAmB;QACnB,IAAI;KACL;IACD,SAAS,EAAE,0EAA0E;IACrF,YAAY,EAAE;QACZ,yCAAyC;QACzC,yDAAyD;KAC1D;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,mGAAmG;KAC7G;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE,6EAA6E;KACvF;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,mCAAmC;QAC3C,aAAa,EAAE,mCAAmC;KACnD;IACD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4FAA4F;IAC7G,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,SAAS;KACV;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=integral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integral.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/integral.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAgGjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,101 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "integral",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "integral",
8
+ "numerical integration",
9
+ "adaptive quadrature",
10
+ "quadrature",
11
+ "function handle"
12
+ ],
13
+ "summary": "Approximate a finite scalar definite integral using adaptive quadrature.",
14
+ "references": [
15
+ "https://www.mathworks.com/help/matlab/ref/integral.html"
16
+ ],
17
+ "gpu_support": {
18
+ "elementwise": false,
19
+ "reduction": false,
20
+ "precisions": [],
21
+ "broadcasting": "none",
22
+ "notes": "The adaptive solver runs on the host. Callback functions may still call GPU-aware builtins."
23
+ },
24
+ "fusion": {
25
+ "elementwise": false,
26
+ "reduction": false,
27
+ "max_inputs": 3,
28
+ "constants": "inline"
29
+ },
30
+ "requires_feature": null,
31
+ "tested": {
32
+ "unit": "builtins::math::optim::integral::tests",
33
+ "integration": "runmat-vm/tests/closures.rs::integral_accepts_anonymous_function"
34
+ },
35
+ "description": "`q = integral(fun, a, b)` approximates the definite integral of `fun` from `a` to `b`. The first implementation supports scalar-valued integrands over finite real bounds.",
36
+ "behaviors": [
37
+ "The function may be a named function handle such as `@sin`, an anonymous function such as `@(x) x.^2`, or a function-handle string.",
38
+ "The integration loop evaluates the integrand at scalar sample points and adapts subintervals using Simpson error estimates.",
39
+ "The integrand must return a finite real scalar. Array-valued and complex-valued integrands are not supported yet.",
40
+ "Finite reversed bounds are accepted and negate the result. Equal bounds return zero.",
41
+ "`AbsTol`, `RelTol`, and `MaxFunEvals` name/value options are accepted for the initial scalar implementation."
42
+ ],
43
+ "examples": [
44
+ {
45
+ "description": "Integrate a polynomial anonymous function",
46
+ "input": "q = integral(@(x) x.^2, 0, 1)",
47
+ "output": "q =\n 0.3333"
48
+ },
49
+ {
50
+ "description": "Integrate sine over one half-period",
51
+ "input": "q = integral(@sin, 0, pi)",
52
+ "output": "q =\n 2.0000"
53
+ },
54
+ {
55
+ "description": "Set tighter tolerances",
56
+ "input": "q = integral(@sin, 0, pi, 'AbsTol', 1e-12, 'RelTol', 1e-8)",
57
+ "output": "q =\n 2.0000"
58
+ }
59
+ ],
60
+ "faqs": [
61
+ {
62
+ "question": "Is this the same as trapz?",
63
+ "answer": "No. `integral` evaluates a function handle adaptively over continuous bounds. `trapz` integrates already-sampled discrete data."
64
+ },
65
+ {
66
+ "question": "Does integral support vector-valued functions?",
67
+ "answer": "Not yet. The initial implementation supports finite real scalar-valued integrands."
68
+ },
69
+ {
70
+ "question": "Does integral run on the GPU?",
71
+ "answer": "The adaptive solver runs on the host because it repeatedly invokes user code through function-handle dispatch. The callback itself may call GPU-aware builtins."
72
+ }
73
+ ],
74
+ "links": [
75
+ {
76
+ "label": "trapz",
77
+ "url": "./trapz"
78
+ },
79
+ {
80
+ "label": "cumtrapz",
81
+ "url": "./cumtrapz"
82
+ },
83
+ {
84
+ "label": "fzero",
85
+ "url": "./fzero"
86
+ }
87
+ ],
88
+ "source": {
89
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/integral.rs`",
90
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/integral.rs"
91
+ },
92
+ "key": "integral",
93
+ "slug": "integral",
94
+ "aliases": [],
95
+ "categoryPath": [
96
+ "math",
97
+ "optim"
98
+ ]
99
+ };
100
+ export default builtinDoc;
101
+ //# sourceMappingURL=integral.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integral.js","sourceRoot":"","sources":["../../../src/generated/builtins/integral.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE;QACV,UAAU;QACV,uBAAuB;QACvB,qBAAqB;QACrB,YAAY;QACZ,iBAAiB;KAClB;IACD,SAAS,EAAE,0EAA0E;IACrF,YAAY,EAAE;QACZ,yDAAyD;KAC1D;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,6FAA6F;KACvG;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,wCAAwC;QAChD,aAAa,EAAE,kEAAkE;KAClF;IACD,aAAa,EAAE,4KAA4K;IAC3L,WAAW,EAAE;QACX,qIAAqI;QACrI,6HAA6H;QAC7H,mHAAmH;QACnH,sFAAsF;QACtF,8GAA8G;KAC/G;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,2CAA2C;YAC1D,OAAO,EAAE,+BAA+B;YACxC,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,aAAa,EAAE,qCAAqC;YACpD,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,aAAa,EAAE,wBAAwB;YACvC,OAAO,EAAE,4DAA4D;YACrE,QAAQ,EAAE,iBAAiB;SAC5B;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,4BAA4B;YACxC,QAAQ,EAAE,iIAAiI;SAC5I;QACD;YACE,UAAU,EAAE,gDAAgD;YAC5D,QAAQ,EAAE,oFAAoF;SAC/F;QACD;YACE,UAAU,EAAE,+BAA+B;YAC3C,QAAQ,EAAE,iKAAiK;SAC5K;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;QACD;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,6DAA6D;QACtE,KAAK,EAAE,0GAA0G;KAClH;IACD,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,OAAO;KACR;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/mode.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA6IjB,CAAC;AAEF,eAAe,UAAU,CAAC"}