in src/main/java/com/twitter/sbf/core/SparseBinaryMatrix.java [202:222]
public void initFromColSets(IntSet[] inputCols) {
// Initialize resizable rows
IntList[] dynamicRows = new IntList[this.numRows];
for (int i = 0; i < this.numRows; i++) {
dynamicRows[i] = new IntArrayList();
}
this.cols = inputCols;
for (int i = 0; i < this.numCols; i++) {
for (int c : this.cols[i]) {
dynamicRows[c].add(i);
}
}
// Sort each row and copy to myself
for (int i = 0; i < this.numRows; i++) {
int[] row = dynamicRows[i].toIntArray();
Arrays.sort(row);
this.rows[i] = row;
}
}