computeMatrixSignPairs function

Compute the matrix of signs of pairs