runmat 0.5.2-dev.1 → 0.5.2-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.
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=linprog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linprog.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/linprog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAqGjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,106 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "linprog",
5
+ "category": "math/optim",
6
+ "keywords": [
7
+ "linprog",
8
+ "linear programming",
9
+ "optimization",
10
+ "linear constraints",
11
+ "bounds"
12
+ ],
13
+ "summary": "Solve linear programming minimization problems with inequality constraints, equality constraints, and bounds.",
14
+ "references": [],
15
+ "gpu_support": {
16
+ "elementwise": false,
17
+ "reduction": false,
18
+ "precisions": [],
19
+ "broadcasting": "none",
20
+ "notes": "The solver runs on the host. GPU-resident numeric inputs are gathered before solving."
21
+ },
22
+ "fusion": {
23
+ "elementwise": false,
24
+ "reduction": false,
25
+ "max_inputs": 7,
26
+ "constants": "inline"
27
+ },
28
+ "requires_feature": null,
29
+ "tested": {
30
+ "unit": "builtins::math::optim::linprog::tests",
31
+ "integration": null
32
+ },
33
+ "description": "`linprog` minimizes `f' * x` subject to `A*x <= b`, `Aeq*x == beq`, and `lb <= x <= ub`. Supported forms are `x = linprog(f,A,b)`, `x = linprog(f,A,b,Aeq,beq)`, `x = linprog(f,A,b,Aeq,beq,lb,ub)`, and the two-, three-, and four-output variants.",
34
+ "behaviors": [
35
+ "`f`, `b`, `beq`, `lb`, and `ub` must be numeric vectors with compatible lengths.",
36
+ "`A` and `Aeq` must be numeric matrices with one column per element of `f`.",
37
+ "`[]` may be passed for omitted optional `Aeq`, `beq`, `lb`, or `ub` arguments.",
38
+ "`exitflag` is `1` when an optimum is found, `-2` when no feasible point is found, and `-3` when the objective is unbounded below.",
39
+ "The fourth output is a struct with `iterations`, `algorithm`, `constrviolation`, and `message` fields.",
40
+ "Advanced MATLAB options, algorithms, problem structs, and lambda outputs are intentionally unsupported in this initial implementation."
41
+ ],
42
+ "examples": [
43
+ {
44
+ "description": "Solve a bounded linear program",
45
+ "input": "f = [-1; -2];\nA = [1 1];\nb = 4;\n[x, fval, exitflag] = linprog(f, A, b, [], [], [0; 0], [])",
46
+ "output": "x =\n 0\n 4\nfval =\n -8\nexitflag =\n 1"
47
+ },
48
+ {
49
+ "description": "Use equality constraints and lower bounds",
50
+ "input": "f = [1; 2];\nA = [];\nb = [];\nAeq = [1 1];\nbeq = 3;\n[x, fval] = linprog(f, A, b, Aeq, beq, [1; 0], [])",
51
+ "output": "x =\n 3\n 0\nfval =\n 3"
52
+ },
53
+ {
54
+ "description": "Use a finite lower bound on one variable",
55
+ "input": "f = [1; 0];\n[x, fval, exitflag] = linprog(f, [], [], [], [], [2; -Inf], [])",
56
+ "output": "x =\n 2\n 0\nfval =\n 2\nexitflag =\n 1"
57
+ },
58
+ {
59
+ "description": "Optimize along an equality face",
60
+ "input": "f = [-1; 0; 0];\nA = [1 0 0];\nb = 1;\nAeq = [0 0 1];\nbeq = 0;\n[x, fval, exitflag] = linprog(f, A, b, Aeq, beq, [], [])",
61
+ "output": "x =\n 1\n 0\n 0\nfval =\n -1\nexitflag =\n 1"
62
+ },
63
+ {
64
+ "description": "Inspect infeasible status",
65
+ "input": "[x, fval, exitflag, output] = linprog(1, [], [], [], [], 2, 1);\nexitflag",
66
+ "output": "exitflag =\n -2"
67
+ }
68
+ ],
69
+ "faqs": [
70
+ {
71
+ "question": "Does linprog support optimoptions or MATLAB problem structs?",
72
+ "answer": "No. This implementation supports the common positional numeric call forms only."
73
+ },
74
+ {
75
+ "question": "Does linprog run on the GPU?",
76
+ "answer": "No. It gathers GPU-resident inputs and runs the active-set solve on the host."
77
+ }
78
+ ],
79
+ "links": [
80
+ {
81
+ "label": "fminbnd",
82
+ "url": "./fminbnd"
83
+ },
84
+ {
85
+ "label": "fsolve",
86
+ "url": "./fsolve"
87
+ },
88
+ {
89
+ "label": "optimset",
90
+ "url": "./optimset"
91
+ }
92
+ ],
93
+ "source": {
94
+ "label": "`crates/runmat-runtime/src/builtins/math/optim/linprog.rs`",
95
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/optim/linprog.rs"
96
+ },
97
+ "key": "linprog",
98
+ "slug": "linprog",
99
+ "aliases": [],
100
+ "categoryPath": [
101
+ "math",
102
+ "optim"
103
+ ]
104
+ };
105
+ export default builtinDoc;
106
+ //# sourceMappingURL=linprog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linprog.js","sourceRoot":"","sources":["../../../src/generated/builtins/linprog.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,oBAAoB;QACpB,cAAc;QACd,oBAAoB;QACpB,QAAQ;KACT;IACD,SAAS,EAAE,+GAA+G;IAC1H,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,uFAAuF;KACjG;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;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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,EA02QjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAwa9D,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,EA83QjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAya9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
@@ -4277,6 +4277,26 @@ export const builtinManifest = [
4277
4277
  "summary": "Return largest-dimension length in MATLAB and RunMat.",
4278
4278
  "exampleCount": 5
4279
4279
  },
4280
+ {
4281
+ "key": "linprog",
4282
+ "title": "linprog",
4283
+ "slug": "linprog",
4284
+ "aliases": [],
4285
+ "category": "math/optim",
4286
+ "categoryPath": [
4287
+ "math",
4288
+ "optim"
4289
+ ],
4290
+ "keywords": [
4291
+ "linprog",
4292
+ "linear programming",
4293
+ "optimization",
4294
+ "linear constraints",
4295
+ "bounds"
4296
+ ],
4297
+ "summary": "Solve linear programming minimization problems with inequality constraints, equality constraints, and bounds.",
4298
+ "exampleCount": 5
4299
+ },
4280
4300
  {
4281
4301
  "key": "linsolve",
4282
4302
  "title": "linsolve",
@@ -8767,6 +8787,7 @@ export const builtinDocLoaders = {
8767
8787
  "le": () => import("./builtins/le.js").then((mod) => mod.default),
8768
8788
  "legend": () => import("./builtins/legend.js").then((mod) => mod.default),
8769
8789
  "length": () => import("./builtins/length.js").then((mod) => mod.default),
8790
+ "linprog": () => import("./builtins/linprog.js").then((mod) => mod.default),
8770
8791
  "linsolve": () => import("./builtins/linsolve.js").then((mod) => mod.default),
8771
8792
  "linspace": () => import("./builtins/linspace.js").then((mod) => mod.default),
8772
8793
  "load": () => import("./builtins/load.js").then((mod) => mod.default),