@Override public double get(int row, int col) { if (row == col) { return diag.get(row); } return -backing.get(row, col); }
@Override // todo: update to use vector ops public void multAdd(double alpha, double[] x, double[] y) { int l = backing.numRows(); for (int i = 0; i < l; i++) { y[i] = -y[i]; } backing.multAdd(x, y); for (int i = 0; i < l; i++) { y[i] = diag.get(i) * x[i] - y[i]; } }