runmat 0.4.5-dev.0 → 0.4.5-dev.2

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 (33) hide show
  1. package/artifacts/stdlib.snapshot +0 -0
  2. package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
  3. package/dist/generated/builtin-examples-catalog.js +1 -1
  4. package/dist/generated/builtin-examples-catalog.js.map +1 -1
  5. package/dist/generated/builtins/format.d.ts +4 -0
  6. package/dist/generated/builtins/format.d.ts.map +1 -0
  7. package/dist/generated/builtins/format.js +147 -0
  8. package/dist/generated/builtins/format.js.map +1 -0
  9. package/dist/generated/builtins/fsolve.d.ts +4 -0
  10. package/dist/generated/builtins/fsolve.d.ts.map +1 -0
  11. package/dist/generated/builtins/fsolve.js +81 -0
  12. package/dist/generated/builtins/fsolve.js.map +1 -0
  13. package/dist/generated/builtins/fzero.d.ts +4 -0
  14. package/dist/generated/builtins/fzero.d.ts.map +1 -0
  15. package/dist/generated/builtins/fzero.js +86 -0
  16. package/dist/generated/builtins/fzero.js.map +1 -0
  17. package/dist/generated/builtins/optimset.d.ts +4 -0
  18. package/dist/generated/builtins/optimset.d.ts.map +1 -0
  19. package/dist/generated/builtins/optimset.js +71 -0
  20. package/dist/generated/builtins/optimset.js.map +1 -0
  21. package/dist/generated/builtins-manifest.d.ts.map +1 -1
  22. package/dist/generated/builtins-manifest.js +88 -0
  23. package/dist/generated/builtins-manifest.js.map +1 -1
  24. package/dist/lsp/runmat_lsp.d.ts +2 -2
  25. package/dist/lsp/runmat_lsp.js +4 -4
  26. package/dist/lsp/runmat_lsp_bg.wasm +0 -0
  27. package/dist/lsp/runmat_lsp_bg.wasm.d.ts +2 -2
  28. package/dist/pkg-web/runmat_wasm_web.d.ts +3 -3
  29. package/dist/pkg-web/runmat_wasm_web.js +7 -7
  30. package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
  31. package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +3 -3
  32. package/dist/runtime/stdlib.snapshot +0 -0
  33. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/format.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA8IjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,147 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "format",
5
+ "category": "io",
6
+ "keywords": [
7
+ "format",
8
+ "display",
9
+ "precision",
10
+ "numeric",
11
+ "short",
12
+ "long",
13
+ "scientific",
14
+ "rational",
15
+ "hex"
16
+ ],
17
+ "summary": "Set the numeric display format for console output, controlling how floating-point numbers are shown.",
18
+ "references": [
19
+ "https://www.mathworks.com/help/matlab/ref/format.html"
20
+ ],
21
+ "gpu_support": {
22
+ "elementwise": false,
23
+ "reduction": false,
24
+ "precisions": [],
25
+ "broadcasting": "none",
26
+ "notes": "format is a display-only setting; it has no effect on GPU computation or residency."
27
+ },
28
+ "fusion": {
29
+ "elementwise": false,
30
+ "reduction": false,
31
+ "max_inputs": 0,
32
+ "constants": "none"
33
+ },
34
+ "requires_feature": null,
35
+ "tested": {
36
+ "unit": "builtins::io::format::tests",
37
+ "integration": null
38
+ },
39
+ "description": "`format` controls how numeric values appear in the Command Window. The setting is session-wide and persists until changed. Supported numeric precision modes: `short` (default), `long`, `shortE`, `longE`, `shortG`, `longG`, `rat`, and `hex`. Spacing modes `compact` and `loose` are accepted without error but are not yet implemented. Calling `format` without arguments resets to `short`.",
40
+ "behaviors": [
41
+ "Calling `format` with no arguments resets to the default `short` mode.",
42
+ "`format short` displays 4 decimal places in fixed notation for values in [0.001, 10000); uses scientific notation outside that range.",
43
+ "`format long` displays 15 decimal places in fixed notation for values in [0.001, 10000); uses 14-decimal scientific notation outside that range.",
44
+ "`format shortE` always uses scientific notation with 4 decimal places (e.g., `3.1416e+00`).",
45
+ "`format longE` always uses scientific notation with 14 decimal places.",
46
+ "`format shortG` uses the more compact of fixed/scientific notation with 5 significant digits, trimming trailing zeros.",
47
+ "`format longG` uses the more compact of fixed/scientific notation with 15 significant digits, trimming trailing zeros.",
48
+ "`format rat` approximates values as ratios of small integers using a tolerance of 5×10⁻⁷ (e.g., `355/113` for pi). `format rational` is accepted as an alias.",
49
+ "`format hex` displays the IEEE 754 double-precision hexadecimal bit pattern (e.g., `400921fb54442d18` for pi).",
50
+ "`format compact` and `format loose` are accepted without error for script compatibility but do not yet change output spacing.",
51
+ "The format setting applies to auto-print results and `disp` output. `fprintf`/`sprintf` use their own explicit format specifiers and are not affected.",
52
+ "Mode names are case-insensitive."
53
+ ],
54
+ "examples": [
55
+ {
56
+ "description": "Default short format",
57
+ "input": "format short\npi",
58
+ "output": "ans = 3.1416"
59
+ },
60
+ {
61
+ "description": "Long format for full precision",
62
+ "input": "format long\npi",
63
+ "output": "ans = 3.141592653589793"
64
+ },
65
+ {
66
+ "description": "Scientific notation with short precision",
67
+ "input": "format shortE\npi",
68
+ "output": "ans = 3.1416e+00"
69
+ },
70
+ {
71
+ "description": "Scientific notation with full precision",
72
+ "input": "format longE\npi",
73
+ "output": "ans = 3.14159265358979e+00"
74
+ },
75
+ {
76
+ "description": "Rational approximation",
77
+ "input": "format rat\npi",
78
+ "output": "ans = 355/113"
79
+ },
80
+ {
81
+ "description": "Hexadecimal IEEE 754 representation",
82
+ "input": "format hex\npi",
83
+ "output": "ans = 400921fb54442d18"
84
+ },
85
+ {
86
+ "description": "Resetting to default",
87
+ "input": "format\npi",
88
+ "output": "ans = 3.1416"
89
+ }
90
+ ],
91
+ "faqs": [
92
+ {
93
+ "question": "Does `format` affect computation results?",
94
+ "answer": "No. `format` only changes how values are displayed. Internal precision is always IEEE 754 double."
95
+ },
96
+ {
97
+ "question": "Is the format setting persistent across cells?",
98
+ "answer": "Yes. The setting is stored per-session thread and remains active until changed by another `format` call."
99
+ },
100
+ {
101
+ "question": "What is the default format?",
102
+ "answer": "`format short` — 4 decimal places in fixed notation, falling back to scientific for very large or very small values."
103
+ },
104
+ {
105
+ "question": "Does `format` affect `disp`?",
106
+ "answer": "Yes. `disp` and auto-print both use the active format setting. `fprintf` and `sprintf` use their own explicit format specifiers and ignore this setting."
107
+ },
108
+ {
109
+ "question": "Are format mode names case-sensitive?",
110
+ "answer": "No. `format SHORT`, `format Short`, and `format short` are all equivalent."
111
+ },
112
+ {
113
+ "question": "What does `format rat` do for integers?",
114
+ "answer": "Integers are displayed as-is without a denominator (e.g., `42` rather than `42/1`). `format rational` is accepted as an alias for `format rat`."
115
+ }
116
+ ],
117
+ "links": [
118
+ {
119
+ "label": "disp",
120
+ "url": "./disp"
121
+ },
122
+ {
123
+ "label": "fprintf",
124
+ "url": "./fprintf"
125
+ },
126
+ {
127
+ "label": "sprintf",
128
+ "url": "./sprintf"
129
+ }
130
+ ],
131
+ "source": {
132
+ "label": "`crates/runmat-runtime/src/builtins/io/format.rs`",
133
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/io/format.rs"
134
+ },
135
+ "gpu_residency": "`format` is a display-only setting with no effect on GPU residency or acceleration.",
136
+ "gpu_behavior": [
137
+ "`format` does not interact with GPU tensors. It only affects how values are rendered after being gathered to the host for display."
138
+ ],
139
+ "key": "format",
140
+ "slug": "format",
141
+ "aliases": [],
142
+ "categoryPath": [
143
+ "io"
144
+ ]
145
+ };
146
+ export default builtinDoc;
147
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/generated/builtins/format.ts"],"names":[],"mappings":"AAAA,8CAA8C;A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+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=fsolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fsolve.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/fsolve.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA4EjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,81 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "fsolve",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "fsolve",
8
+ "nonlinear solve",
9
+ "root finding",
10
+ "Jacobian",
11
+ "Levenberg-Marquardt"
12
+ ],
13
+ "summary": "Solve scalar or vector nonlinear equation systems using finite-difference Levenberg-Marquardt iterations.",
14
+ "references": [
15
+ "https://www.mathworks.com/help/optim/ug/fsolve.html"
16
+ ],
17
+ "gpu_support": {
18
+ "elementwise": false,
19
+ "reduction": false,
20
+ "precisions": [],
21
+ "broadcasting": "none",
22
+ "notes": "The nonlinear 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::fsolve::tests",
33
+ "integration": "runmat-vm/tests/closures.rs::fsolve_accepts_anonymous_vector_function"
34
+ },
35
+ "description": "`x = fsolve(fun, x0)` solves `fun(x) = 0` starting from `x0`. Scalar guesses return scalars; vector and matrix guesses return a result with the same shape as `x0`.",
36
+ "behaviors": [
37
+ "The function handle must return a finite real scalar or vector.",
38
+ "Jacobians are estimated with forward finite differences.",
39
+ "The step is chosen with a Levenberg-Marquardt damping parameter and accepted only when it reduces the residual norm.",
40
+ "Options are supplied as a struct, usually created with `optimset`. `TolX`, `TolFun`, `MaxIter`, `MaxFunEvals`, and `Display` are accepted."
41
+ ],
42
+ "examples": [
43
+ {
44
+ "description": "Solve a two-variable nonlinear system",
45
+ "input": "F = @(x) [x(1)^2 + x(2)^2 - 4; x(1)*x(2) - 1];\nx = fsolve(F, [1; 1])",
46
+ "output": "x =\n 1.9319\n 0.5176"
47
+ },
48
+ {
49
+ "description": "Solve a scalar equation",
50
+ "input": "x = fsolve(@sin, 3)",
51
+ "output": "x =\n 3.1416"
52
+ }
53
+ ],
54
+ "links": [
55
+ {
56
+ "label": "fzero",
57
+ "url": "./fzero"
58
+ },
59
+ {
60
+ "label": "optimset",
61
+ "url": "./optimset"
62
+ },
63
+ {
64
+ "label": "linsolve",
65
+ "url": "./linsolve"
66
+ }
67
+ ],
68
+ "source": {
69
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/fsolve.rs`",
70
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/fsolve.rs"
71
+ },
72
+ "key": "fsolve",
73
+ "slug": "fsolve",
74
+ "aliases": [],
75
+ "categoryPath": [
76
+ "math",
77
+ "optim"
78
+ ]
79
+ };
80
+ export default builtinDoc;
81
+ //# sourceMappingURL=fsolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fsolve.js","sourceRoot":"","sources":["../../../src/generated/builtins/fsolve.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE;QACV,QAAQ;QACR,iBAAiB;QACjB,cAAc;QACd,UAAU;QACV,qBAAqB;KACtB;IACD,SAAS,EAAE,2GAA2G;IACtH,YAAY,EAAE;QACZ,qDAAqD;KACtD;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,8FAA8F;KACxG;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,sCAAsC;QAC9C,aAAa,EAAE,uEAAuE;KACvF;IACD,aAAa,EAAE,qKAAqK;IACpL,WAAW,EAAE;QACX,iEAAiE;QACjE,0DAA0D;QAC1D,sHAAsH;QACtH,4IAA4I;KAC7I;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,uCAAuC;YACtD,OAAO,EAAE,uEAAuE;YAChF,QAAQ,EAAE,6BAA6B;SACxC;QACD;YACE,aAAa,EAAE,yBAAyB;YACxC,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,iBAAiB;SAC5B;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,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,2DAA2D;QACpE,KAAK,EAAE,wGAAwG;KAChH;IACD,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,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=fzero.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fzero.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/fzero.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAiFjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,86 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "fzero",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "fzero",
8
+ "root finding",
9
+ "zero",
10
+ "brent",
11
+ "optimization"
12
+ ],
13
+ "summary": "Find a zero of a scalar nonlinear function using bracket expansion and Brent's method.",
14
+ "references": [
15
+ "https://www.mathworks.com/help/matlab/ref/fzero.html"
16
+ ],
17
+ "gpu_support": {
18
+ "elementwise": false,
19
+ "reduction": false,
20
+ "precisions": [],
21
+ "broadcasting": "none",
22
+ "notes": "The 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::fzero::tests",
33
+ "integration": "runmat-vm/tests/closures.rs::fzero_accepts_anonymous_function"
34
+ },
35
+ "description": "`x = fzero(fun, x0)` searches near the scalar initial point `x0` for a sign-changing bracket, then refines the zero. `x = fzero(fun, [a b])` uses the supplied two-element bracket directly.",
36
+ "behaviors": [
37
+ "The function handle must return a finite real scalar.",
38
+ "Bracket endpoints must have opposite signs unless one endpoint is already a root.",
39
+ "Options are supplied as a struct, usually created with `optimset`. `TolX`, `MaxIter`, `MaxFunEvals`, and `Display` are accepted.",
40
+ "Anonymous functions, named function handles, and function-handle strings work through RunMat's existing `feval` dispatch path."
41
+ ],
42
+ "examples": [
43
+ {
44
+ "description": "Find the fixed point of cosine",
45
+ "input": "f = @(x) cos(x) - x;\nx = fzero(f, 0.5)",
46
+ "output": "x =\n 0.7391"
47
+ },
48
+ {
49
+ "description": "Use an explicit bracket",
50
+ "input": "x = fzero(@sin, [3 4])",
51
+ "output": "x =\n 3.1416"
52
+ },
53
+ {
54
+ "description": "Set a tighter tolerance",
55
+ "input": "opts = optimset('TolX', 1e-10, 'Display', 'off');\nx = fzero(@sin, [3 4], opts)",
56
+ "output": "x =\n 3.1416"
57
+ }
58
+ ],
59
+ "links": [
60
+ {
61
+ "label": "fsolve",
62
+ "url": "./fsolve"
63
+ },
64
+ {
65
+ "label": "optimset",
66
+ "url": "./optimset"
67
+ },
68
+ {
69
+ "label": "roots",
70
+ "url": "./roots"
71
+ }
72
+ ],
73
+ "source": {
74
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/fzero.rs`",
75
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/fzero.rs"
76
+ },
77
+ "key": "fzero",
78
+ "slug": "fzero",
79
+ "aliases": [],
80
+ "categoryPath": [
81
+ "math",
82
+ "optim"
83
+ ]
84
+ };
85
+ export default builtinDoc;
86
+ //# sourceMappingURL=fzero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fzero.js","sourceRoot":"","sources":["../../../src/generated/builtins/fzero.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE;QACV,OAAO;QACP,cAAc;QACd,MAAM;QACN,OAAO;QACP,cAAc;KACf;IACD,SAAS,EAAE,wFAAwF;IACnG,YAAY,EAAE;QACZ,sDAAsD;KACvD;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,qCAAqC;QAC7C,aAAa,EAAE,+DAA+D;KAC/E;IACD,aAAa,EAAE,8LAA8L;IAC7M,WAAW,EAAE;QACX,uDAAuD;QACvD,mFAAmF;QACnF,kIAAkI;QAClI,gIAAgI;KACjI;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,gCAAgC;YAC/C,OAAO,EAAE,yCAAyC;YAClD,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,aAAa,EAAE,yBAAyB;YACxC,OAAO,EAAE,wBAAwB;YACjC,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,aAAa,EAAE,yBAAyB;YACxC,OAAO,EAAE,iFAAiF;YAC1F,QAAQ,EAAE,iBAAiB;SAC5B;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,UAAU;SAClB;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,0DAA0D;QACnE,KAAK,EAAE,uGAAuG;KAC/G;IACD,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,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=optimset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optimset.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/optimset.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAkEjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,71 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "optimset",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "optimset",
8
+ "options",
9
+ "TolX",
10
+ "TolFun",
11
+ "MaxIter",
12
+ "Display"
13
+ ],
14
+ "summary": "Create or update an optimization options structure for fzero and fsolve.",
15
+ "references": [
16
+ "https://www.mathworks.com/help/matlab/ref/optimset.html"
17
+ ],
18
+ "gpu_support": {
19
+ "elementwise": false,
20
+ "reduction": false,
21
+ "precisions": [],
22
+ "broadcasting": "none",
23
+ "notes": "Options are host metadata."
24
+ },
25
+ "fusion": {
26
+ "elementwise": false,
27
+ "reduction": false,
28
+ "max_inputs": 0,
29
+ "constants": "inline"
30
+ },
31
+ "requires_feature": null,
32
+ "tested": {
33
+ "unit": "builtins::math::optim::optimset::tests"
34
+ },
35
+ "description": "`opts = optimset(name, value, ...)` creates a struct of optimization options. `opts = optimset(old, name, value, ...)` copies an existing options struct and applies overrides.",
36
+ "behaviors": [
37
+ "Option names are case-insensitive for the builtins that consume them.",
38
+ "`TolX`, `TolFun`, `MaxIter`, `MaxFunEvals`, and `Display` are canonicalized when constructed with `optimset`.",
39
+ "Unknown option names are preserved so future solvers can read them."
40
+ ],
41
+ "examples": [
42
+ {
43
+ "description": "Create options for fzero",
44
+ "input": "opts = optimset('TolX', 1e-10, 'Display', 'off');\nx = fzero(@sin, [3 4], opts)",
45
+ "output": "x =\n 3.1416"
46
+ }
47
+ ],
48
+ "links": [
49
+ {
50
+ "label": "fzero",
51
+ "url": "./fzero"
52
+ },
53
+ {
54
+ "label": "fsolve",
55
+ "url": "./fsolve"
56
+ }
57
+ ],
58
+ "source": {
59
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/optimset.rs`",
60
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/optimset.rs"
61
+ },
62
+ "key": "optimset",
63
+ "slug": "optimset",
64
+ "aliases": [],
65
+ "categoryPath": [
66
+ "math",
67
+ "optim"
68
+ ]
69
+ };
70
+ export default builtinDoc;
71
+ //# sourceMappingURL=optimset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optimset.js","sourceRoot":"","sources":["../../../src/generated/builtins/optimset.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,SAAS;QACT,MAAM;QACN,QAAQ;QACR,SAAS;QACT,SAAS;KACV;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,4BAA4B;KACtC;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;KACjD;IACD,aAAa,EAAE,iLAAiL;IAChM,WAAW,EAAE;QACX,uEAAuE;QACvE,+GAA+G;QAC/G,qEAAqE;KACtE;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,0BAA0B;YACzC,OAAO,EAAE,iFAAiF;YAC1F,QAAQ,EAAE,iBAAiB;SAC5B;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;QACD;YACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,UAAU;SAClB;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EA8sOjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8W9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
1
+ {"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EAkyOjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAkX9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
@@ -2289,6 +2289,29 @@ export const builtinManifest = [
2289
2289
  "summary": "Open a file and obtain a MATLAB-compatible file identifier.",
2290
2290
  "exampleCount": 7
2291
2291
  },
2292
+ {
2293
+ "key": "format",
2294
+ "title": "format",
2295
+ "slug": "format",
2296
+ "aliases": [],
2297
+ "category": "io",
2298
+ "categoryPath": [
2299
+ "io"
2300
+ ],
2301
+ "keywords": [
2302
+ "format",
2303
+ "display",
2304
+ "precision",
2305
+ "numeric",
2306
+ "short",
2307
+ "long",
2308
+ "scientific",
2309
+ "rational",
2310
+ "hex"
2311
+ ],
2312
+ "summary": "Set the numeric display format for console output, controlling how floating-point numbers are shown.",
2313
+ "exampleCount": 7
2314
+ },
2292
2315
  {
2293
2316
  "key": "fprintf",
2294
2317
  "title": "fprintf",
@@ -2353,6 +2376,26 @@ export const builtinManifest = [
2353
2376
  "summary": "Rewind the file position indicator to the beginning of an open file.",
2354
2377
  "exampleCount": 3
2355
2378
  },
2379
+ {
2380
+ "key": "fsolve",
2381
+ "title": "fsolve",
2382
+ "slug": "fsolve",
2383
+ "aliases": [],
2384
+ "category": "math/optim",
2385
+ "categoryPath": [
2386
+ "math",
2387
+ "optim"
2388
+ ],
2389
+ "keywords": [
2390
+ "fsolve",
2391
+ "nonlinear solve",
2392
+ "root finding",
2393
+ "Jacobian",
2394
+ "Levenberg-Marquardt"
2395
+ ],
2396
+ "summary": "Solve scalar or vector nonlinear equation systems using finite-difference Levenberg-Marquardt iterations.",
2397
+ "exampleCount": 2
2398
+ },
2356
2399
  {
2357
2400
  "key": "fspecial",
2358
2401
  "title": "fspecial",
@@ -2416,6 +2459,26 @@ export const builtinManifest = [
2416
2459
  "summary": "Write binary data to a file identifier with MATLAB-compatible precision, skip, and machine-format semantics.",
2417
2460
  "exampleCount": 6
2418
2461
  },
2462
+ {
2463
+ "key": "fzero",
2464
+ "title": "fzero",
2465
+ "slug": "fzero",
2466
+ "aliases": [],
2467
+ "category": "math/optim",
2468
+ "categoryPath": [
2469
+ "math",
2470
+ "optim"
2471
+ ],
2472
+ "keywords": [
2473
+ "fzero",
2474
+ "root finding",
2475
+ "zero",
2476
+ "brent",
2477
+ "optimization"
2478
+ ],
2479
+ "summary": "Find a zero of a scalar nonlinear function using bracket expansion and Brent's method.",
2480
+ "exampleCount": 3
2481
+ },
2419
2482
  {
2420
2483
  "key": "gamma",
2421
2484
  "title": "gamma",
@@ -4581,6 +4644,27 @@ export const builtinManifest = [
4581
4644
  "summary": "Create arrays filled with ones within the MATLAB language.",
4582
4645
  "exampleCount": 3
4583
4646
  },
4647
+ {
4648
+ "key": "optimset",
4649
+ "title": "optimset",
4650
+ "slug": "optimset",
4651
+ "aliases": [],
4652
+ "category": "math/optim",
4653
+ "categoryPath": [
4654
+ "math",
4655
+ "optim"
4656
+ ],
4657
+ "keywords": [
4658
+ "optimset",
4659
+ "options",
4660
+ "TolX",
4661
+ "TolFun",
4662
+ "MaxIter",
4663
+ "Display"
4664
+ ],
4665
+ "summary": "Create or update an optimization options structure for fzero and fsolve.",
4666
+ "exampleCount": 1
4667
+ },
4584
4668
  {
4585
4669
  "key": "or",
4586
4670
  "title": "or",
@@ -7489,12 +7573,15 @@ export const builtinDocLoaders = {
7489
7573
  "flipud": () => import("./builtins/flipud.js").then((mod) => mod.default),
7490
7574
  "floor": () => import("./builtins/floor.js").then((mod) => mod.default),
7491
7575
  "fopen": () => import("./builtins/fopen.js").then((mod) => mod.default),
7576
+ "format": () => import("./builtins/format.js").then((mod) => mod.default),
7492
7577
  "fprintf": () => import("./builtins/fprintf.js").then((mod) => mod.default),
7493
7578
  "fread": () => import("./builtins/fread.js").then((mod) => mod.default),
7494
7579
  "frewind": () => import("./builtins/frewind.js").then((mod) => mod.default),
7580
+ "fsolve": () => import("./builtins/fsolve.js").then((mod) => mod.default),
7495
7581
  "fspecial": () => import("./builtins/fspecial.js").then((mod) => mod.default),
7496
7582
  "fullfile": () => import("./builtins/fullfile.js").then((mod) => mod.default),
7497
7583
  "fwrite": () => import("./builtins/fwrite.js").then((mod) => mod.default),
7584
+ "fzero": () => import("./builtins/fzero.js").then((mod) => mod.default),
7498
7585
  "gamma": () => import("./builtins/gamma.js").then((mod) => mod.default),
7499
7586
  "gather": () => import("./builtins/gather.js").then((mod) => mod.default),
7500
7587
  "gca": () => import("./builtins/gca.js").then((mod) => mod.default),
@@ -7602,6 +7689,7 @@ export const builtinDocLoaders = {
7602
7689
  "num2str": () => import("./builtins/num2str.js").then((mod) => mod.default),
7603
7690
  "numel": () => import("./builtins/numel.js").then((mod) => mod.default),
7604
7691
  "ones": () => import("./builtins/ones.js").then((mod) => mod.default),
7692
+ "optimset": () => import("./builtins/optimset.js").then((mod) => mod.default),
7605
7693
  "or": () => import("./builtins/or.js").then((mod) => mod.default),
7606
7694
  "orderfields": () => import("./builtins/orderfields.js").then((mod) => mod.default),
7607
7695
  "pad": () => import("./builtins/pad.js").then((mod) => mod.default),