int tmp = g[b]; g[b] = g[c]; g[c] = tmp;
}
};
// compare splitter[a] with columnView[rowIndexes[b]]
final ObjectMatrix1D columnView = matrix.viewColumn(column);
IntComparator comp = new IntComparator() {
public int compare(int a, int b) {
Comparable av = (Comparable) (splitters[a]);
Comparable bv = (Comparable) (columnView.getQuick(g[b]));
int r = av.compareTo(bv);
return r<0 ? -1 : (r==0 ? 0 : 1);
}
};
// compare columnView[rowIndexes[a]] with columnView[rowIndexes[b]]
IntComparator comp2 = new IntComparator() {
public int compare(int a, int b) {
Comparable av = (Comparable) (columnView.getQuick(g[a]));
Comparable bv = (Comparable) (columnView.getQuick(g[b]));
int r = av.compareTo(bv);
return r<0 ? -1 : (r==0 ? 0 : 1);
}
};