runmat 0.4.10-dev.8 → 0.4.10-dev.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.
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=ss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ss.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/ss.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA8HjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,131 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "ss",
5
+ "category": "control",
6
+ "keywords": [
7
+ "ss",
8
+ "state space",
9
+ "control system",
10
+ "state matrix",
11
+ "sample time"
12
+ ],
13
+ "summary": "Create a state-space model object from A, B, C, and D matrices.",
14
+ "references": [],
15
+ "gpu_support": {
16
+ "elementwise": false,
17
+ "reduction": false,
18
+ "precisions": [],
19
+ "broadcasting": "none",
20
+ "notes": "`ss` constructs host-side metadata. If matrix inputs are gpuArray values, RunMat gathers them before validating dimensions and creating the object."
21
+ },
22
+ "fusion": {
23
+ "elementwise": false,
24
+ "reduction": false,
25
+ "max_inputs": 0,
26
+ "constants": "inline",
27
+ "notes": "`ss` is not fused; it constructs a host-side object."
28
+ },
29
+ "requires_feature": null,
30
+ "tested": {
31
+ "unit": "builtins::control::ss::tests",
32
+ "integration": "crates/runmat-vm/tests/control.rs"
33
+ },
34
+ "description": "`ss(A, B, C, D)` creates a lightweight state-space model object from finite real numeric matrices. `A` is the state matrix, `B` maps inputs to states, `C` maps states to outputs, and `D` is direct feedthrough.",
35
+ "behaviors": [
36
+ "Returns an object whose class name is `ss`.",
37
+ "Stores `A`, `B`, `C`, `D`, `Ts`, `InputDelay`, `OutputDelay`, `StateName`, `InputName`, and `OutputName` properties.",
38
+ "Preserves the input matrix orientations on the returned object.",
39
+ "Uses continuous-time defaults with `Ts` equal to `0`.",
40
+ "`ss(A, B, C, D, Ts)` stores a finite non-negative sample time.",
41
+ "`ss(A, B, C, D, 'Ts', Ts)` and `ss(A, B, C, D, 'SampleTime', Ts)` store a finite non-negative sample time.",
42
+ "Numeric scalar inputs are treated as 1-by-1 matrices and are accepted only when the resulting dimensions are consistent.",
43
+ "Complex, sparse, descriptor-form, uncertain, identified, and generalized models are not supported in this initial implementation."
44
+ ],
45
+ "examples": [
46
+ {
47
+ "description": "Creating a continuous-time state-space model",
48
+ "input": "A = [0 1; -2 -3];\nB = [0; 1];\nC = [1 0];\nD = 0;\nG = ss(A, B, C, D);\nclass(G)",
49
+ "output": "ans = \"ss\""
50
+ },
51
+ {
52
+ "description": "Reading stored state-space matrices",
53
+ "input": "G = ss([0 1; -2 -3], [0; 1], [1 0], 0);\nfprintf(\"%.0f %.0f %.0f %.0f %.0f %.0f\\n\", G.A(1), G.A(2), G.A(3), G.A(4), G.B(1), G.B(2));",
54
+ "output": "0 -2 1 -3 0 1"
55
+ },
56
+ {
57
+ "description": "Creating a discrete-time model",
58
+ "input": "G = ss(0.5, 1, 1, 0, 0.1);\nfprintf(\"%.1f\\n\", G.Ts);",
59
+ "output": "0.1"
60
+ },
61
+ {
62
+ "description": "Specifying sample time with a name-value pair",
63
+ "input": "G = ss(0.5, 1, 1, 0, 'SampleTime', 0.2);\nfprintf(\"%.1f\\n\", G.Ts);",
64
+ "output": "0.2"
65
+ }
66
+ ],
67
+ "faqs": [
68
+ {
69
+ "question": "Does `ss` simulate step or impulse responses?",
70
+ "answer": "No. This builtin constructs a state-space object. Response functions can add `ss` parsing separately."
71
+ },
72
+ {
73
+ "question": "Does `ss` accept complex or sparse matrices?",
74
+ "answer": "Not yet. Inputs must be finite real numeric scalars or dense matrices."
75
+ },
76
+ {
77
+ "question": "How are dimensions validated?",
78
+ "answer": "`A` must be n-by-n, `B` must be n-by-nu, `C` must be ny-by-n, and `D` must be ny-by-nu."
79
+ },
80
+ {
81
+ "question": "Will `ss(gpuArray(A), B, C, D)` return a gpuArray-backed object?",
82
+ "answer": "No. `ss` gathers gpuArray inputs and stores host tensors on the returned object."
83
+ }
84
+ ],
85
+ "links": [
86
+ {
87
+ "label": "tf",
88
+ "url": "./tf"
89
+ },
90
+ {
91
+ "label": "step",
92
+ "url": "./step"
93
+ },
94
+ {
95
+ "label": "impulse",
96
+ "url": "./impulse"
97
+ }
98
+ ],
99
+ "source": {
100
+ "label": "`crates/runmat-runtime/src/builtins/control/ss.rs`",
101
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/ss.rs"
102
+ },
103
+ "syntax": {
104
+ "example": {
105
+ "description": "Supported forms",
106
+ "input": "G = ss(A, B, C, D)\nG = ss(A, B, C, D, Ts)\nG = ss(A, B, C, D, 'Ts', Ts)\nG = ss(A, B, C, D, 'SampleTime', Ts)",
107
+ "output": "G is an ss object."
108
+ },
109
+ "points": [
110
+ "`A`, `B`, `C`, and `D` must be finite real numeric scalars or dense matrices.",
111
+ "`Ts` is optional and must be a finite non-negative scalar.",
112
+ "The object stores matrices exactly in the provided orientation after gpuArray gathering."
113
+ ]
114
+ },
115
+ "validation": {
116
+ "summary": "`ss` validates finite real matrix inputs, state-space dimension consistency, supported name-value options, and sample-time constraints before constructing the host-side object. Unit and integration tests cover continuous and discrete constructors, property access, invalid dimensions, invalid sample times, descriptor signatures, and gpuArray gathering.",
117
+ "implementation": {
118
+ "label": "`crates/runmat-runtime/src/builtins/control/ss.rs`",
119
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/ss.rs"
120
+ }
121
+ },
122
+ "gpu_residency": "`ss` is a host-side object constructor. gpuArray matrix inputs are gathered before object construction, and the returned state-space object does not live on the GPU.",
123
+ "key": "ss",
124
+ "slug": "ss",
125
+ "aliases": [],
126
+ "categoryPath": [
127
+ "control"
128
+ ]
129
+ };
130
+ export default builtinDoc;
131
+ //# sourceMappingURL=ss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ss.js","sourceRoot":"","sources":["../../../src/generated/builtins/ss.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,aAAa;QACb,gBAAgB;QAChB,cAAc;QACd,aAAa;KACd;IACD,SAAS,EAAE,iEAAiE;IAC5E,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,qJAAqJ;KAC/J;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE,sDAAsD;KAChE;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,8BAA8B;QACtC,aAAa,EAAE,mCAAmC;KACnD;IACD,aAAa,EAAE,mNAAmN;IAClO,WAAW,EAAE;QACX,6CAA6C;QAC7C,sHAAsH;QACtH,iEAAiE;QACjE,uDAAuD;QACvD,gEAAgE;QAChE,4GAA4G;QAC5G,0HAA0H;QAC1H,mIAAmI;KACpI;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,8CAA8C;YAC7D,OAAO,EAAE,mFAAmF;YAC5F,QAAQ,EAAE,cAAc;SACzB;QACD;YACE,aAAa,EAAE,qCAAqC;YACpD,OAAO,EAAE,yIAAyI;YAClJ,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,aAAa,EAAE,gCA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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,EAu1QjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAua9D,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,EA02QjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAwa9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
@@ -7096,6 +7096,25 @@ export const builtinManifest = [
7096
7096
  "summary": "Remove singleton (size-one) dimensions while preserving MATLAB vector semantics.",
7097
7097
  "exampleCount": 6
7098
7098
  },
7099
+ {
7100
+ "key": "ss",
7101
+ "title": "ss",
7102
+ "slug": "ss",
7103
+ "aliases": [],
7104
+ "category": "control",
7105
+ "categoryPath": [
7106
+ "control"
7107
+ ],
7108
+ "keywords": [
7109
+ "ss",
7110
+ "state space",
7111
+ "control system",
7112
+ "state matrix",
7113
+ "sample time"
7114
+ ],
7115
+ "summary": "Create a state-space model object from A, B, C, and D matrices.",
7116
+ "exampleCount": 4
7117
+ },
7099
7118
  {
7100
7119
  "key": "stairs",
7101
7120
  "title": "stairs",
@@ -8887,6 +8906,7 @@ export const builtinDocLoaders = {
8887
8906
  "sqrt": () => import("./builtins/sqrt.js").then((mod) => mod.default),
8888
8907
  "square": () => import("./builtins/square.js").then((mod) => mod.default),
8889
8908
  "squeeze": () => import("./builtins/squeeze.js").then((mod) => mod.default),
8909
+ "ss": () => import("./builtins/ss.js").then((mod) => mod.default),
8890
8910
  "stairs": () => import("./builtins/stairs.js").then((mod) => mod.default),
8891
8911
  "startswith": () => import("./builtins/startsWith.js").then((mod) => mod.default),
8892
8912
  "std": () => import("./builtins/std.js").then((mod) => mod.default),