private int pairIndex(int ii, int jj){
        int ret = -1;
        int i = 0;
        boolean test = true;
        while(test){
            if(this.pairIndices[i][0]==ii && this.pairIndices[i][1]==jj){
                ret = i;
                test = false;
            }
            else{
                if(this.pairIndices[i][0]==jj && this.pairIndices[i][1]==ii){
                    ret = i;
                    test = false;
                }
                else{
                    i++;
                    if(i>=this.nComparisons){
                        throw new IllegalArgumentException("No index found " + ii + " and " + jj);
                    }
                }
            }
        }
        return ret;
    }