A general formulation for some inconsistency indices of pairwise comparisons