public Solver getYTYSolver() { RealMatrix YTY; Lock lock = yLock.readLock(); lock.lock(); try { YTY = VectorMath.transposeTimesSelf(Y.values()); } finally { lock.unlock(); } return new LinearSystemSolver().getSolver(YTY); }
public Solver getXTXSolver() { RealMatrix XTX; Lock lock = xLock.readLock(); lock.lock(); try { XTX = VectorMath.transposeTimesSelf(X.values()); } finally { lock.unlock(); } return new LinearSystemSolver().getSolver(XTX); }