Calculates the total number of Anti-Robinson violations over all triplets in the matrix using the specified ordering. This is equivalent to GAR with a full window.
AR(mat, order)
The AR score (the total number of structural violations).
Please refer to GAP
for complete usage examples.
A symmetric numeric distance matrix.
A permutation vector specifying the new row/column order.