Function name: sort_mat
Description:

Fast sorting of the columns-rows of a matrix.

Authors: Manos Papadakis