Generalization of the RCGM and LSLRpairwise comparison methods