public void solve(T B, T X) { if (alg.modifiesB()) { this.B = UtilEjml.reshapeOrDeclare(this.B, B); this.B.To = B; B = this.B; } alg.solve(B, X); }
public virtual void solve(T B, T X) { if (alg.modifiesB()) { if (this.B == null) { this.B = (T)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); }