@Override public void solve(D B, D X) { if( alg.modifiesB() ) { if( this.B == null ) { this.B = B.copy(); } else { if( this.B.getNumRows() != B.getNumRows() || this.B.getNumCols() != B.getNumCols() ) { this.B.reshape(A.getNumRows(),B.getNumCols()); } this.B.set(B); } B = this.B; } alg.solve(B,X); }