A gradient method for inconsistency reduction of pairwise comparisons matrices