Documentation

CslibFrontier.Algorithms.WordRAM.Hungarian.Regs

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.

@[reducible, inline]

Constant 0.

@[reducible, inline]

Constant 1.

@[reducible, inline]

Constant 2.

@[reducible, inline]

Side size n.

@[reducible, inline]

Matrix entry count n * n.

@[reducible, inline]

Shift magnitude M.

@[reducible, inline]

Base of n × n shifted cost matrix C.

@[reducible, inline]

Base of row potentials y (n words).

@[reducible, inline]

Base of negated column potentials -z (n words).

@[reducible, inline]

Base of column mates colMate (n words).

@[reducible, inline]

Base of tree-column flags used (n words).

@[reducible, inline]

Base of tree-row flags tree (n words).

@[reducible, inline]

Base of column slacks minv (n words).

@[reducible, inline]

Base of predecessor rows bestRow (n words).

@[reducible, inline]

Output header cell (1 word), followed immediately by rowMate.

@[reducible, inline]

Base of row mates rowMate (n words, at outBase + 1).

@[reducible, inline]

Accumulator / encoded minimum cost output register.

Register frame holding constants, problem dimensions, and all contiguous array base addresses starting at bC.

def Cslib.Algorithms.WordRAM.Hungarian.CostMem {n : ℕ} (bC : ℕ) (C : Fin n × Fin n → ℕ) (mem : ℕ → ℕ) :

Memory holds the n × n unsigned cost matrix C row-major at bC.