### 3.7.69. Cost matrix

A constraint for which a first argument corresponds to a collection of variables $\mathrm{𝚅𝚊𝚛𝚜}$, a second argument to a cost matrix $𝙼$, and a third argument to a cost variable $𝙲$. Let $\mathrm{𝚅𝚊𝚕𝚜}$ denote the set of values that can be assigned to the variables of $\mathrm{𝚅𝚊𝚛𝚜}$. The cost matrix defines for each pair $v,u$ $\left(v\in \mathrm{𝚅𝚊𝚛𝚜},u\in \mathrm{𝚅𝚊𝚕𝚜}\right)$ an elementary cost, which is used for computing $𝙲$ when value $u$ is assigned to variable $v$.