/** * <tt>A = A - B*s <=> A[i] = A[i] - B[i]*s</tt>. * @param A the matrix to modify. * @param B the matrix to stay unaffected. * @param s the scalar; can have any value. * @return <tt>A</tt> (for convenience only). */ public static DoubleMatrix1D minusMult(DoubleMatrix1D A, DoubleMatrix1D B, double s) { return A.assign(B,F.minusMult(s)); } /**
/** * <tt>A = A - B*s <=> A[row,col] = A[row,col] - B[row,col]*s</tt>. * @param A the matrix to modify. * @param B the matrix to stay unaffected. * @param s the scalar; can have any value. * @return <tt>A</tt> (for convenience only). */ public static DoubleMatrix2D minusMult(DoubleMatrix2D A, DoubleMatrix2D B, double s) { return A.assign(B,F.minusMult(s)); } /**
/** * <tt>A = A - B*s <=> A[i] = A[i] - B[i]*s</tt>. * @param A the matrix to modify. * @param B the matrix to stay unaffected. * @param s the scalar; can have any value. * @return <tt>A</tt> (for convenience only). */ public static DoubleMatrix1D minusMult(DoubleMatrix1D A, DoubleMatrix1D B, double s) { return A.assign(B,F.minusMult(s)); } /**
/** * <tt>A = A - B*s <=> A[row,col] = A[row,col] - B[row,col]*s</tt>. * @param A the matrix to modify. * @param B the matrix to stay unaffected. * @param s the scalar; can have any value. * @return <tt>A</tt> (for convenience only). */ public static DoubleMatrix2D minusMult(DoubleMatrix2D A, DoubleMatrix2D B, double s) { return A.assign(B,F.minusMult(s)); } /**
public void drot(DoubleMatrix1D x, DoubleMatrix1D y, double c, double s) { x.checkSize(y); DoubleMatrix1D tmp = x.copy(); x.assign(F.mult(c)); x.assign(y,F.plusMult(s)); y.assign(F.mult(c)); y.assign(tmp,F.minusMult(s)); } public void drotg(double a, double b, double rotvec[]) {
public void drot(DoubleMatrix1D x, DoubleMatrix1D y, double c, double s) { x.checkSize(y); DoubleMatrix1D tmp = x.copy(); x.assign(F.mult(c)); x.assign(y,F.plusMult(s)); y.assign(F.mult(c)); y.assign(tmp,F.minusMult(s)); } public void drotg(double a, double b, double rotvec[]) {