*/
private AtomicSparseVector getRow(int row,
int col,
boolean createIfAbsent) {
rowReadLock.lock();
AtomicSparseVector rowEntry = sparseMatrix.get(row);
if (col >= cols.get())
cols.set(col + 1);
rowReadLock.unlock();
// If no row existed, create one
if (rowEntry == null && createIfAbsent) {
rowWriteLock.lock();
// ensure that another thread has not already added this row while
// this thread was waiting on the lock
rowEntry = sparseMatrix.get(row);
if (rowEntry == null) {
rowEntry = new AtomicSparseVector(new CompactSparseVector());
// update the bounds as necessary
if (row >= rows.get()) {
rows.set(row + 1);
}