public void plusRow(int index, Vector row) { /* * often accumulation goes in row-increasing order, so check for this to * avoid binary search (another log Height multiplier). */ int pos = numRows == 0 || rowIndices[numRows - 1] < index ? -numRows - 1 : Arrays .binarySearch(rowIndices, 0, numRows, index); if (pos >= 0) { rows[pos].assign(row, PlusMult.plusMult(1)); } else { insertIntoPos(-pos - 1, index, row); } }
} else { insertIntoPos(i, bOther.rowIndices[j], bOther.rows[j]); insertIntoPos(numRows, bOther.rowIndices[j], bOther.rows[j]);
public void plusRow(int index, Vector row) { /* * often accumulation goes in row-increasing order, so check for this to * avoid binary search (another log Height multiplier). */ int pos = numRows == 0 || rowIndices[numRows - 1] < index ? -numRows - 1 : Arrays .binarySearch(rowIndices, 0, numRows, index); if (pos >= 0) { rows[pos].assign(row, PlusMult.plusMult(1)); } else { insertIntoPos(-pos - 1, index, row); } }
public void plusRow(int index, Vector row) { /* * often accumulation goes in row-increasing order, so check for this to * avoid binary search (another log Height multiplier). */ int pos = numRows == 0 || rowIndices[numRows - 1] < index ? -numRows - 1 : Arrays .binarySearch(rowIndices, 0, numRows, index); if (pos >= 0) { rows[pos].assign(row, PlusMult.plusMult(1)); } else { insertIntoPos(-pos - 1, index, row); } }
} else { insertIntoPos(i, bOther.rowIndices[j], bOther.rows[j]); insertIntoPos(numRows, bOther.rowIndices[j], bOther.rows[j]);
} else { insertIntoPos(i, bOther.rowIndices[j], bOther.rows[j]); insertIntoPos(numRows, bOther.rowIndices[j], bOther.rows[j]);