get_matrix_order function

Return the hierarchical clustering order of a matrix