Order the the matrix by upper diag in a greedy fashion
orderMatrixIndex(mat)
mat
A matrix
returns a matrix in order of greatest in upper diagonal direction.
David L Gibbs