@mark1russell7/linear 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Russell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,113 @@
1
- # Temporary Holding Version
1
+ # @mark1russell7/linear
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This package holds exact linear algebra and exact linear programs (roadmap item A30). Each value is a rational of `@mark1russell7/rational`, so each result is exact. Each result of a linear program has a certificate, and `checkCertificate` examines it without trust in the solver.
4
+
5
+ ## Vectors and matrices
6
+
7
+ A `Vector` is a list of rationals. A `Matrix` is a list of rows, and each row has the same length.
8
+
9
+ | Function | Result |
10
+ | --- | --- |
11
+ | `toRational(v)` | The rational of a number, a `bigint`, a decimal text or a quotient text, for example `"3/4"` |
12
+ | `vector(values)`, `matrix(rows)` | A vector or a matrix of rationals from inputs that `toRational` reads |
13
+ | `dot(a, b)`, `multiply(m, x)`, `transpose(m)` | The dot product, the product of a matrix and a vector, and the transpose |
14
+ | `rref(m)` | The reduced row echelon form and the column of each pivot |
15
+ | `rank(m)` | The count of pivots |
16
+ | `nullSpace(m)` | A basis of the vectors `v` with `m v = 0`: one vector for each column with no pivot |
17
+ | `solve(a, b)` | A solution `x` and a basis of the null space, or a certificate `y` with `y a = 0` and `y b = 1` |
18
+
19
+ The matrix of `solve` can be square or not, and its rank can be below its size. Each function that reads a matrix with no rows takes the count of columns as an argument.
20
+
21
+ ## Linear programs
22
+
23
+ A `LinearProgram` has a sense (`"max"` or `"min"`), an objective vector `c` and a list of constraint rows. Each row has coefficients, a relation (`"<="`, `">="` or `"="`) and a right side. Each variable has the lower bound 0.
24
+
25
+ A free variable `v` is the difference of two variables `p - q`. Copy each coefficient of `v` to `p`, and put its negative on `q`.
26
+
27
+ ```ts
28
+ import { checkCertificate, linearProgram, solveLinearProgram } from "@mark1russell7/linear";
29
+
30
+ const program = linearProgram({
31
+ sense: "max",
32
+ objective: [3, 5],
33
+ constraints: [
34
+ { coefficients: [1, 0], relation: "<=", rhs: 4 },
35
+ { coefficients: [0, 2], relation: "<=", rhs: 12 },
36
+ { coefficients: [3, 2], relation: "<=", rhs: 18 },
37
+ ],
38
+ });
39
+ const result = solveLinearProgram(program);
40
+ // result is optimal: x = (2, 6), value 36, dual (0, 3/2, 1).
41
+ checkCertificate(program, result).valid; // true
42
+ ```
43
+
44
+ `solveLinearProgram` uses an exact two-phase simplex. The rule of Bland selects each pivot, so the method ends on each program, the degenerate programs too. Phase 1 finds a feasible basis or a Farkas ray. Phase 2 optimizes the objective.
45
+
46
+ ## The certificates
47
+
48
+ | Status | Certificate | The conditions that `checkCertificate` examines |
49
+ | --- | --- | --- |
50
+ | `optimal` | The point `x`, its value and a dual vector `dual` with one entry for each row | `x` is feasible, the dual is feasible, `c x = b y`, and complementary slackness holds on each row and each column |
51
+ | `infeasible` | A Farkas ray `ray` with one entry for each row | `y A >= 0`, `b y < 0`, `y_i >= 0` on a `<=` row and `y_i <= 0` on a `>=` row |
52
+ | `unbounded` | A feasible point `x` and a direction `direction` | `x` is feasible, the direction is not negative, each row keeps its relation along the direction, and `c d` improves the objective |
53
+
54
+ The dual of a maximization obeys `y A >= c`, with `y_i >= 0` on a `<=` row and `y_i <= 0` on a `>=` row. The dual of a minimization swaps each of these signs. An `=` row takes a dual of each sign.
55
+
56
+ A Farkas ray proves that no point is feasible: for each `x >= 0` that meets the rows, `0 <= y A x <= y b < 0`, and that is false.
57
+
58
+ ## Lexicographic objectives
59
+
60
+ `solveLexicographic(constraints, objectives)` optimizes each objective in its order. Stage `k` keeps the optimum of each earlier objective as an equality row. The result gives each stage with its program and its result, so `checkCertificate` examines each stage. The status `optimal` also gives the last point and the optimum of each objective. A stage with no optimum stops the solve, and its result has the certificate.
61
+
62
+ Only the first stage can be infeasible, because each later stage keeps the optimal point of the stage before it. A later stage can be unbounded after optimal stages, because its objective is new.
63
+
64
+ ## Integer programs
65
+
66
+ An `IntegerProgram` is a linear program with a list `integer` of variable indices. Each of these variables takes integer values only. The other variables stay continuous.
67
+
68
+ `solveIntegerProgram(program, options)` uses branch and bound on the exact simplex. The search goes depth first. It branches on the fractional integer variable with the smallest index, and it takes the child `x_j <= k` first. A node is a leaf when its relaxation has no point or has no better optimum than the best integer point.
69
+
70
+ ```ts
71
+ import { checkIntegerCertificate, linearProgram, solveIntegerProgram } from "@mark1russell7/linear";
72
+
73
+ const program = {
74
+ ...linearProgram({
75
+ sense: "max",
76
+ objective: [5, 4],
77
+ constraints: [
78
+ { coefficients: [6, 4], relation: "<=", rhs: 24 },
79
+ { coefficients: [1, 2], relation: "<=", rhs: 6 },
80
+ ],
81
+ }),
82
+ integer: [0, 1],
83
+ };
84
+ const result = solveIntegerProgram(program);
85
+ // result is optimal: x = (4, 0), value 20. The relaxation gives x = (3, 3/2), value 21.
86
+ checkIntegerCertificate(program, result).valid; // true
87
+ ```
88
+
89
+ | Status | Certificate | The conditions that `checkIntegerCertificate` examines |
90
+ | --- | --- | --- |
91
+ | `optimal` | The point `x`, its value and the tree | `x` is a feasible integer point with the value `c x`. The tree covers each integer point, and the value of each leaf is not better. |
92
+ | `infeasible` | The tree | The tree covers each integer point, and each leaf has a Farkas ray. |
93
+ | `unbounded` | An integer point `x` and a direction | The conditions of `checkCertificate`. Also, each integer variable of the point and of the direction is an integer. |
94
+ | `limit` | The best point, if any, a bound and the tree | The point is a feasible integer point. Each closed leaf and the parent of each open node have a value that is not better than the bound. |
95
+
96
+ The tree covers each integer point when each branched node has the two children `x_j <= k` and `x_j >= k + 1`. Each leaf has the certificate of its relaxation.
97
+
98
+ An unbounded relaxation starts a search for one integer point with the objective 0. The rows are rational, so a program with an integer point has the unbounded directions of its relaxation. The direction times the common denominator of its entries is an integer direction.
99
+
100
+ The search can go on with no end, for example on the line `2x - 2y = 1`. The option `nodeLimit` stops it, and the default is 10000 relaxations. The result `limit` then gives the best point that the search found and a proved bound of the optimum.
101
+
102
+ ## The tests
103
+
104
+ - Each result of the simplex on 3 seeded families of small programs goes through `checkCertificate`. The families are random programs, programs with equality rows, and degenerate programs with many zero right sides.
105
+ - An enumeration of each vertex and each extreme ray of each small program gives the status and the optimal value. The simplex agrees with it on each case.
106
+ - Changed certificates fail the check: a new value, a moved point, a moved dual, a negated ray and a negated direction.
107
+ - The cycling examples of Beale and of Chvátal end under the rule of Bland. The test also shows that the rule of the largest coefficient meets an earlier basis again on them.
108
+ - Property tests on random matrices examine `rank`, `nullSpace` and `solve`.
109
+ - Each result of `solveIntegerProgram` on 3 seeded families goes through `checkIntegerCertificate`. The families are integer programs in a box, mixed programs in a box and programs with no box.
110
+ - In a box, an enumeration of each integer point gives the status and the optimal value. The enumeration uses the vertex enumeration for the continuous variables, not the simplex. The solver agrees with it on each case.
111
+ - The optimum of the relaxation, rounded down, misses the integer optimum on some programs in a box. This is the base.
112
+
113
+ The property tests use `fast-check` with a fixed seed. The variable `PROPERTY_RUNS` sets the count of cases of each property, and the default is 300.
@@ -0,0 +1,284 @@
1
+ import { Rational } from "@mark1russell7/rational";
2
+ /** A vector of exact rationals. */
3
+ type Vector = readonly Rational[];
4
+ /** A matrix of exact rationals as a list of rows. Each row has the same length. */
5
+ type Matrix = readonly Vector[];
6
+ /** A value that `toRational` reads: a rational, a `bigint`, a JavaScript number, or a text, for example `"3/4"` or `"0.25"`. */
7
+ type RationalInput = Rational | bigint | number | string;
8
+ /**
9
+ * This function gives the exact rational of an input. A number gives the decimal that JavaScript prints for it. A text is a
10
+ * decimal or a quotient of two decimals.
11
+ *
12
+ * @throws {RangeError} The input is not a finite value, or the text has a zero divisor.
13
+ */
14
+ export declare function toRational(value: RationalInput): Rational;
15
+ /** This function gives a vector of exact rationals from a list of inputs. */
16
+ export declare function vector(values: readonly RationalInput[]): Vector;
17
+ /**
18
+ * This function gives a matrix of exact rationals from a list of rows.
19
+ *
20
+ * @throws {RangeError} The rows do not have the same length.
21
+ */
22
+ export declare function matrix(rows: readonly (readonly RationalInput[])[]): Matrix;
23
+ /**
24
+ * This function gives the count of columns of a matrix. A matrix with no rows has 0 columns.
25
+ *
26
+ * @throws {RangeError} The rows do not have the same length.
27
+ */
28
+ export declare function columnsOf(m: Matrix): number;
29
+ /**
30
+ * This function gives the dot product of two vectors.
31
+ *
32
+ * @throws {RangeError} The vectors do not have the same length.
33
+ */
34
+ export declare function dot(a: Vector, b: Vector): Rational;
35
+ /**
36
+ * This function gives the product of a matrix and a vector.
37
+ *
38
+ * @throws {RangeError} The length of the vector is not the count of columns.
39
+ */
40
+ export declare function multiply(m: Matrix, x: Vector): Vector;
41
+ /** This function gives the transpose of a matrix. The argument `columns` gives the row count of the result for a matrix with no rows. */
42
+ export declare function transpose(m: Matrix, columns?: number): Matrix;
43
+ /** The reduced row echelon form of a matrix and the column of each pivot, in order. */
44
+ interface RowEchelon {
45
+ readonly matrix: Matrix;
46
+ readonly pivots: readonly number[];
47
+ }
48
+ /**
49
+ * This function gives the reduced row echelon form of a matrix, with exact arithmetic.
50
+ *
51
+ * @throws {RangeError} The rows do not have the same length.
52
+ */
53
+ export declare function rref(m: Matrix): RowEchelon;
54
+ /** This function gives the rank of a matrix: the count of pivots of its reduced row echelon form. */
55
+ export declare function rank(m: Matrix): number;
56
+ /**
57
+ * This function gives a basis of the null space of a matrix: the vectors `v` with `m v = 0`. The basis has one vector for each
58
+ * column with no pivot. That vector has 1 at its column and 0 at each other column with no pivot. The argument `columns`
59
+ * gives the count of columns for a matrix with no rows.
60
+ */
61
+ export declare function nullSpace(m: Matrix, columns?: number): Matrix;
62
+ /**
63
+ * The result of `solve`. A system with a solution gives one solution `x` and a basis of the null space. Each solution is `x` plus a
64
+ * combination of the basis. A system with no solution gives a certificate `y` with `y A = 0` and `y b = 1`.
65
+ */
66
+ type SolveResult = {
67
+ readonly status: "solved";
68
+ readonly x: Vector;
69
+ readonly nullSpace: Matrix;
70
+ } | {
71
+ readonly status: "inconsistent";
72
+ readonly certificate: Vector;
73
+ };
74
+ /**
75
+ * This function solves the system `a x = b` exactly. The matrix can be square or not, and it can have a rank below its size.
76
+ * The solution `x` has 0 at each column with no pivot.
77
+ *
78
+ * @throws {RangeError} The rows do not have the same length, or `b` has a length that is not the row count.
79
+ */
80
+ export declare function solve(a: Matrix, b: Vector, columns?: number): SolveResult;
81
+ /** The direction of an objective: `"max"` to maximize it, `"min"` to minimize it. */
82
+ type Sense = "max" | "min";
83
+ /** The relation of a constraint row to its right side. */
84
+ type Relation = "<=" | ">=" | "=";
85
+ /** One constraint row: `coefficients · x` has the relation `relation` to `rhs`. */
86
+ interface Constraint {
87
+ readonly coefficients: Vector;
88
+ readonly relation: Relation;
89
+ readonly rhs: Rational;
90
+ }
91
+ /**
92
+ * A linear program: optimize `objective · x` subject to the constraint rows and `x >= 0`. Each variable has the lower bound 0.
93
+ * A free variable `v` is the difference of two variables `p - q`. Copy each coefficient of `v` to `p`. Put its negative on `q`.
94
+ */
95
+ interface LinearProgram {
96
+ readonly sense: Sense;
97
+ readonly objective: Vector;
98
+ readonly constraints: readonly Constraint[];
99
+ }
100
+ /**
101
+ * The result of a linear program, with its certificate.
102
+ *
103
+ * - `optimal`: the point `x`, its value `objective · x`, and a dual vector `dual` with one entry for each constraint row.
104
+ * - `infeasible`: a Farkas ray `ray` with one entry for each constraint row. `checkCertificate` tells its conditions.
105
+ * - `unbounded`: a feasible point `x` and a direction `direction`. Each point `x + t direction` with `t >= 0` is feasible, and
106
+ * the objective improves without limit along it.
107
+ */
108
+ type LinearProgramResult = {
109
+ readonly status: "optimal";
110
+ readonly x: Vector;
111
+ readonly value: Rational;
112
+ readonly dual: Vector;
113
+ } | {
114
+ readonly status: "infeasible";
115
+ readonly ray: Vector;
116
+ } | {
117
+ readonly status: "unbounded";
118
+ readonly x: Vector;
119
+ readonly direction: Vector;
120
+ };
121
+ /** One constraint row of `linearProgram`, with inputs that `toRational` reads. */
122
+ interface ConstraintInput {
123
+ readonly coefficients: readonly RationalInput[];
124
+ readonly relation: Relation;
125
+ readonly rhs: RationalInput;
126
+ }
127
+ /** A linear program with inputs that `toRational` reads. */
128
+ interface LinearProgramInput {
129
+ readonly sense: Sense;
130
+ readonly objective: readonly RationalInput[];
131
+ readonly constraints: readonly ConstraintInput[];
132
+ }
133
+ /**
134
+ * This function makes a linear program from inputs that `toRational` reads, and examines its shape.
135
+ *
136
+ * @throws {RangeError} A constraint row has a length that is not the length of the objective.
137
+ */
138
+ export declare function linearProgram(input: LinearProgramInput): LinearProgram;
139
+ /**
140
+ * This function solves a linear program exactly with the two-phase simplex and the rule of Bland. The result has a certificate
141
+ * that `checkCertificate` examines.
142
+ *
143
+ * @throws {RangeError} A constraint row has a length that is not the length of the objective.
144
+ */
145
+ export declare function solveLinearProgram(program: LinearProgram): LinearProgramResult;
146
+ /** One objective of a lexicographic program. */
147
+ interface Objective {
148
+ readonly sense: Sense;
149
+ readonly coefficients: Vector;
150
+ }
151
+ /** One stage of a lexicographic solve: its program, with the earlier optima as equality rows, and its result with a certificate. */
152
+ interface LexicographicStage {
153
+ readonly program: LinearProgram;
154
+ readonly result: LinearProgramResult;
155
+ }
156
+ /**
157
+ * The result of `solveLexicographic`. The status `optimal` gives the last point and the optimum of each objective. The status
158
+ * `infeasible` or `unbounded` comes from the last stage, and its result has the certificate. `checkCertificate` examines each
159
+ * stage with its program.
160
+ */
161
+ type LexicographicResult = {
162
+ readonly status: "optimal";
163
+ readonly x: Vector;
164
+ readonly values: readonly Rational[];
165
+ readonly stages: readonly LexicographicStage[];
166
+ } | {
167
+ readonly status: "infeasible" | "unbounded";
168
+ readonly stages: readonly LexicographicStage[];
169
+ };
170
+ /**
171
+ * This function optimizes the objectives in their order, subject to the constraint rows and `x >= 0`. Stage `k` holds the
172
+ * optimum of each earlier objective as an equality row. The function stops at the first stage with no optimum.
173
+ * Only the first stage can be infeasible. A later stage can be unbounded after optimal stages, because its objective is new.
174
+ *
175
+ * @throws {RangeError} The list of objectives is empty, or a row has a length that is not the length of the first objective.
176
+ */
177
+ export declare function solveLexicographic(constraints: readonly Constraint[], objectives: readonly Objective[]): LexicographicResult;
178
+ /** The verdict of `checkCertificate`. The list `failures` names each condition that the certificate does not meet. */
179
+ interface CertificateCheck {
180
+ readonly valid: boolean;
181
+ readonly failures: readonly string[];
182
+ }
183
+ /**
184
+ * This function examines the certificate of a result with exact arithmetic. It does not trust the solver.
185
+ *
186
+ * - `optimal`: the point is feasible, the dual is feasible, `c x = b y` and complementary slackness holds. For a maximization,
187
+ * the dual obeys `y A >= c`, `y_i >= 0` on a `<=` row and `y_i <= 0` on a `>=` row. A minimization swaps each of these signs.
188
+ * - `infeasible`: the ray obeys `y A >= 0`, `b y < 0`, `y_i >= 0` on a `<=` row and `y_i <= 0` on a `>=` row. Then no `x >= 0`
189
+ * meets the rows, because `0 <= y A x <= y b < 0`.
190
+ * - `unbounded`: the point is feasible, the direction is not negative, each row keeps its relation along it, and the
191
+ * direction improves the objective.
192
+ */
193
+ export declare function checkCertificate(program: LinearProgram, result: LinearProgramResult): CertificateCheck;
194
+ /** A linear program in which each variable of the list `integer` takes integer values only. The other variables are continuous. */
195
+ interface IntegerProgram extends LinearProgram {
196
+ /** The indices of the integer variables. */
197
+ readonly integer: readonly number[];
198
+ }
199
+ /** The row that a node adds to the rows of its parent: `x[variable] <= value` or `x[variable] >= value`. The value is an integer. */
200
+ interface Branch {
201
+ readonly variable: number;
202
+ readonly relation: "<=" | ">=";
203
+ readonly value: Rational;
204
+ }
205
+ /**
206
+ * The outcome of a node of the tree.
207
+ *
208
+ * - `branched`: the node has two children. One child adds `x_j <= k`, and the other child adds `x_j >= k + 1`.
209
+ * - `integer`: the relaxation of the node has an optimum with an integer value on each integer variable.
210
+ * - `bound`: the optimum of the relaxation is not better than the best integer point that the solve found before the node.
211
+ * - `infeasible`: the relaxation of the node has no point.
212
+ * - `open`: the solve stopped at its limit before the node.
213
+ */
214
+ type NodeOutcome = "branched" | "integer" | "bound" | "infeasible" | "open";
215
+ /** One node of the tree. The root is node 0. Each other node has a parent with a smaller index. */
216
+ interface BranchNode {
217
+ readonly parent: number | undefined;
218
+ readonly branch: Branch | undefined;
219
+ readonly outcome: NodeOutcome;
220
+ /** The result of the relaxation of the node, with its certificate. An open node has no result. */
221
+ readonly result: LinearProgramResult | undefined;
222
+ }
223
+ /**
224
+ * The result of an integer program, with its certificate.
225
+ *
226
+ * - `optimal`: the point `x`, its value, and the tree. Each leaf proves that its integer points are not better than `x`.
227
+ * - `infeasible`: the tree. Each leaf has a Farkas ray, so the program has no integer point.
228
+ * - `unbounded`: an integer point `x` and a direction `direction` with an integer value on each integer variable.
229
+ * Each point `x + t direction` with an integer `t >= 0` is an integer point, and the objective improves without limit.
230
+ * - `limit`: the solve stopped at its limit. It gives the best integer point that it found, if any. `bound` is a bound of the
231
+ * optimum that the tree proves. A program with an unbounded relaxation gives no bound.
232
+ */
233
+ type IntegerProgramResult = {
234
+ readonly status: "optimal";
235
+ readonly x: Vector;
236
+ readonly value: Rational;
237
+ readonly tree: readonly BranchNode[];
238
+ } | {
239
+ readonly status: "infeasible";
240
+ readonly tree: readonly BranchNode[];
241
+ } | {
242
+ readonly status: "unbounded";
243
+ readonly x: Vector;
244
+ readonly direction: Vector;
245
+ } | {
246
+ readonly status: "limit";
247
+ readonly x: Vector | undefined;
248
+ readonly value: Rational | undefined;
249
+ readonly bound: Rational | undefined;
250
+ readonly tree: readonly BranchNode[];
251
+ };
252
+ /** The options of `solveIntegerProgram`. */
253
+ interface IntegerOptions {
254
+ /** The largest count of relaxations that the solve solves. The default is 10000. */
255
+ readonly nodeLimit?: number;
256
+ }
257
+ /**
258
+ * This function solves an integer program with branch and bound on the exact simplex. The search goes depth first. It branches
259
+ * on the fractional integer variable with the smallest index.
260
+ *
261
+ * - A relaxation with an optimum starts the search for the optimum. Each node with no better optimum than the best point is a leaf.
262
+ * - An unbounded relaxation starts a search for one integer point with the objective 0. When it finds a point, the program is
263
+ * unbounded: the program has rational rows, so its integer points have the unbounded directions of its relaxation.
264
+ * - The search can go on with no end, for example on a line with no integer point. The limit `nodeLimit` stops it.
265
+ *
266
+ * @throws {RangeError} A row has a length that is not the count of variables.
267
+ * @throws {RangeError} An integer variable is not a variable of the program.
268
+ * @throws {RangeError} The option `nodeLimit` is not an integer of 1 or more.
269
+ */
270
+ export declare function solveIntegerProgram(program: IntegerProgram, options?: IntegerOptions): IntegerProgramResult;
271
+ /**
272
+ * This function examines the certificate of the result of an integer program with exact arithmetic. It does not trust the solver.
273
+ *
274
+ * - `optimal`: the point is feasible, its integer variables are integers, and its value is `c x`. The tree covers each integer
275
+ * point: each branched node has the children `x_j <= k` and `x_j >= k + 1`. Each leaf has a valid certificate of its
276
+ * relaxation, and its value is not better than the value of the point.
277
+ * - `infeasible`: the tree covers each integer point, and each leaf has a Farkas ray.
278
+ * - `unbounded`: the point and the direction meet the conditions of `checkCertificate`, and their integer variables are integers.
279
+ * - `limit`: the point, if any, meets the conditions of an optimum. The tree has the shape of a tree of branches, and each closed
280
+ * leaf has a valid certificate. With a bound, each leaf and the parent of each open node have a value that is not better than the bound.
281
+ */
282
+ export declare function checkIntegerCertificate(program: IntegerProgram, result: IntegerProgramResult): CertificateCheck;
283
+ export type { Branch, BranchNode, CertificateCheck, Constraint, ConstraintInput, IntegerOptions, IntegerProgram, IntegerProgramResult, LexicographicResult, LexicographicStage, LinearProgram, LinearProgramInput, LinearProgramResult, Matrix, NodeOutcome, Objective, RationalInput, Relation, RowEchelon, Sense, SolveResult, Vector };
284
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/vector.ts","../src/matrix.ts","../src/program.ts","../src/simplex.ts","../src/lexicographic.ts","../src/certificate.ts","../src/integer.ts"],"mappings":";;KAQY,kBAAkB;;KAGlB,kBAAkB;;KAGlB,gBAAgB;;;;;;;wBAQZ,WAAW,OAAO,gBAAgB;;wBAelC,OAAO,iBAAiB,kBAAkB;;;;;;wBAS1C,OAAO,yBAAyB,qBAAqB;;;;;;wBAWrD,UAAU,GAAG;;;;;;wBAab,IAAI,GAAG,QAAQ,GAAG,SAAS;;;;;;wBAY3B,SAAS,GAAG,QAAQ,GAAG,SAAS;;wBAKhC,UAAU,GAAG,QAAQ,mBAAiC;;UC9ErD;WACN,QAAQ;WACR;;;;;;;wBAoCK,KAAK,GAAG,SAAS;;wBAQjB,KAAK,GAAG;;;;;;wBASR,UAAU,GAAG,QAAQ,mBAAiC;;;;;KAmB1D;WACG;WAA2B,GAAG;WAAiB,WAAW;;WAC1D;WAAiC,aAAa;;;;;;;;wBAQ7C,MAAM,GAAG,QAAQ,GAAG,QAAQ,mBAAiC;;KCpFjE;;KAGA;;UAGK;WACN,cAAc;WACd,UAAU;WACV,KAAK;;;;;;UAOC;WACN,OAAO;WACP,WAAW;WACX,sBAAsB;;;;;;;;;;KAWrB;WACG;WAA4B,GAAG;WAAiB,OAAO;WAAmB,MAAM;;WAChF;WAA+B,KAAK;;WACpC;WAA8B,GAAG;WAAiB,WAAW;;;UAG3D;WACN,uBAAuB;WACvB,UAAU;WACV,KAAK;;;UAIC;WACN,OAAO;WACP,oBAAoB;WACpB,sBAAsB;;;;;;;wBAQjB,cAAc,OAAO,qBAAqB;;;;;;;wBCyK1C,mBAAmB,SAAS,gBAAgB;;UC7N3C;WACN,OAAO;WACP,cAAc;;;UAIR;WACN,SAAS;WACT,QAAQ;;;;;;;KAQP;WACG;WAA4B,GAAG;WAAiB,iBAAiB;WAAqB,iBAAiB;;WACvG;WAA6C,iBAAiB;;;;;;;;;wBAS7D,mBAAmB,sBAAsB,cAAc,qBAAqB,cAAc;;UC5BzF;WACN;WACA;;;;;;;;;;;;wBAqHK,iBAAiB,SAAS,eAAe,QAAQ,sBAAsB;;UCrHtE,uBAAuB;;WAE7B;;;UAIM;WACN;WACA;WACA,OAAO;;;;;;;;;;;KAYN;;UAGK;WACN;WACA,QAAQ;WACR,SAAS;;WAET,QAAQ;;;;;;;;;;;;KAaP;WACG;WAA4B,GAAG;WAAiB,OAAO;WAAmB,eAAe;;WACzF;WAA+B,eAAe;;WAC9C;WAA8B,GAAG;WAAiB,WAAW;;WAE7D;WACA,GAAG;WACH,OAAO;WACP,OAAO;WACP,eAAe;;;UAIb;;WAEN;;;;;;;;;;;;;;;wBAkHK,oBAAoB,SAAS,gBAAgB,UAAS,iBAAsB;;;;;;;;;;;;wBA6H5E,wBAAwB,SAAS,gBAAgB,QAAQ,uBAAuB"}