Calculates the number of Anti-Robinson violations within a specified window w
,
allowing evaluation of local structural consistency in the reordered matrix.
GAR(mat, order, w = NULL)
The GAR score (the total number of violations).
Please refer to GAP
for complete usage examples.
A symmetric numeric distance matrix.
A permutation vector specifying the new row/column order.
Window size (integer). If NULL, uses global comparisons (equivalent to AR).