Public registers and cost-matrix memory layout for the Word-RAM Hungarian method #
Defines the public Reg constants, the BaseRegs register-frame invariant, and the CostMem
row-major cost-matrix assertion used by coreCode and client programs.
Matrix entry count n * n.
Shift magnitude M.
Base of n × n shifted cost matrix C.
Base of row potentials y (n words).
Base of negated column potentials -z (n words).
Base of column mates colMate (n words).
Base of tree-column flags used (n words).
Base of tree-row flags tree (n words).
Base of column slacks minv (n words).
Base of predecessor rows bestRow (n words).
Output header cell (1 word), followed immediately by rowMate.
Base of row mates rowMate (n words, at outBase + 1).
Accumulator / encoded minimum cost output register.
Register frame holding constants, problem dimensions, and all contiguous array base addresses
starting at bC.
zero = 0.one = 1.two = 2.rn = n.rnn = n * n.rM = M.baseC = bC.baseY = bC + n * n.baseNZ = bC + n * n + n.baseColMate = bC + n * n + 2 * n.baseUsed = bC + n * n + 3 * n.baseTree = bC + n * n + 4 * n.baseMinv = bC + n * n + 5 * n.baseBestRow = bC + n * n + 6 * n.outBase = bC + n * n + 7 * n.baseRowMate = bC + n * n + 7 * n + 1.