## 5.65. change_vectors

Origin
Constraint

$\mathrm{𝚌𝚑𝚊𝚗𝚐𝚎}_\mathrm{𝚟𝚎𝚌𝚝𝚘𝚛𝚜}\left(\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴},\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂},\mathrm{𝙲𝚃𝚁𝚂}\right)$

Types
 $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$ $\mathrm{𝙲𝚃𝚁}$ $\mathrm{𝚊𝚝𝚘𝚖}$
Arguments
 $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}$ $\mathrm{𝚍𝚟𝚊𝚛}$ $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚎𝚌}-\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}\right)$ $\mathrm{𝙲𝚃𝚁𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚌𝚝𝚛}-\mathrm{𝙲𝚃𝚁}\right)$
Restrictions
 $|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}|\ge 1$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁},\mathrm{𝚟𝚊𝚛}\right)$ $\mathrm{𝙲𝚃𝚁}\in \left[=,\ne ,<,\ge ,>,\le \right]$ $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}\ge 0$ $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}<|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂}|$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂},\mathrm{𝚟𝚎𝚌}\right)$ $\mathrm{𝚜𝚊𝚖𝚎}_\mathrm{𝚜𝚒𝚣𝚎}$$\left(\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂},\mathrm{𝚟𝚎𝚌}\right)$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝙲𝚃𝚁𝚂},\mathrm{𝚌𝚝𝚛}\right)$ $|\mathrm{𝙲𝚃𝚁𝚂}|=|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}|$
Purpose

Let us note ${\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{1},{\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{2},\cdots ,{\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{n}$ the vectors of the $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂}$ collection, and $d$ the number of components of each vector (all vectors have the same size). $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}$ is the number of times that the following disjunctions holds where $i\in \left[1,n-1\right]$

$\left({\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i}.\mathrm{𝚟𝚎𝚌}\left[1\right]\mathrm{𝙲𝚃𝚁𝚂}\left[1\right]{\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i+1}.\mathrm{𝚟𝚎𝚌}\left[1\right]\right)\vee$

$\left({\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i}.\mathrm{𝚟𝚎𝚌}\left[2\right]\mathrm{𝙲𝚃𝚁𝚂}\left[2\right]{\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i+1}.\mathrm{𝚟𝚎𝚌}\left[2\right]\right)\vee$

$\cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \cdots \vee$

$\left({\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i}.\mathrm{𝚟𝚎𝚌}\left[d\right]\mathrm{𝙲𝚃𝚁𝚂}\left[d\right]{\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}}_{i+1}.\mathrm{𝚟𝚎𝚌}\left[d\right]\right)$.

Example
$\left(\begin{array}{c}3,〈\begin{array}{c}\mathrm{𝚟𝚎𝚌}-〈4,0〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈4,0〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈4,5〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈3,4〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈3,4〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈3,4〉,\hfill \\ \mathrm{𝚟𝚎𝚌}-〈4,0〉\hfill \end{array}〉,\hfill \\ 〈\ne ,\ne 〉\hfill \end{array}\right)$

In the example we have the following 3 changes:

• One change between $〈4,0〉$ and $〈4,5〉$ since $4\ne 4\vee 0\ne 5$,

• One change between $〈4,5〉$ and $〈3,4〉$ since $4\ne 3\vee 5\ne 4$,

• One change between $〈3,4〉$ and $〈4,0〉$ since $3\ne 4\vee 4\ne 0$.

Consequently the $\mathrm{𝚌𝚑𝚊𝚗𝚐𝚎}_\mathrm{𝚟𝚎𝚌𝚝𝚘𝚛𝚜}$ constraint holds since its first argument $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}$ is assigned value 3.

Typical
 $\mathrm{𝙲𝚃𝚁}\in \left[\ne \right]$ $|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁}|>1$ $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}>0$ $|\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂}|>1$
Arg. properties

Functional dependency: $\mathrm{𝙽𝙲𝙷𝙰𝙽𝙶𝙴}$ determined by $\mathrm{𝚅𝙴𝙲𝚃𝙾𝚁𝚂}$ and $\mathrm{𝙲𝚃𝚁𝚂}$.

specialisation: $\mathrm{𝚌𝚑𝚊𝚗𝚐𝚎}$ (vector replaced by $\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎}$), $\mathrm{𝚌𝚑𝚊𝚗𝚐𝚎}_\mathrm{𝚙𝚊𝚒𝚛}$ (vector replaced by $\mathrm{𝚙𝚊𝚒𝚛}$ of $\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}$).