simplex_step
std.optim.simplex_step · Level L4One pivot of the fraction-free simplex method on an integer tableau, by Bland's rule: the entering column is the first with a negative reduced cost; the leaving row has the smallest ratio rhs/column over positive entries, compared by cross-multiplication, ties to the smallest basic variable. Every row but the pivot row becomes (p·row − T[i, k]·row r)/D, an exact integer division, and D becomes the pivot p. With no entering column the status becomes 1 (optimal); with no leaving row, 0 (unbounded). The body simplex_max runs.
Signature
simplex_step(T: i64[m+1, n+m+1], basis: i64[m], D: i64[], status: i64[]) → i64[m+1, n+m+1], i64[m], i64[], i64[]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
Bland's entering column and leaving row; (p·row − T[i, k]·row r) // Din exact rational arithmetic, on all 40 test cases. - All 1,196 int64 results are exact: the error is zero.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
- correctly rounded (the int64 nearest the exact value)
- 100%
- bit-equal to the NumPy formula in int64
- 100%
- largest error, in units in the last place
- 0
Identity
sha256:cfc09f3e102967cbf330d2511a0790df39a39edb3dde43691b5bc3f6b19e1fc0The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.optim.simplex_step · Ω:simplex_step
- Pins
sha256:6cd233d9a9df664dc367aaac612069144007c796d4a407bb9d0d84e2c270ffebthis graph alone- Evidence
sha256:5bcca69136af887d3dfe52542fd1fc389580fade8e7ab2089a3763b0579c9c00the hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.