public float[] getItemVector(String item) { Lock lock = yLock.readLock(); lock.lock(); try { return Y.get(item); } finally { lock.unlock(); } }
public float[] getUserVector(String user) { Lock lock = xLock.readLock(); lock.lock(); try { return X.get(user); } finally { lock.unlock(); } }