@Test public void testAxpy() throws Exception { DenseVector v = DenseVector.ones(2); BLAS.axpy(1.0, dv1, v); Assert.assertArrayEquals(v.getData(), new double[]{2, 3}, TOL); BLAS.axpy(1.0, spv1, v); Assert.assertArrayEquals(v.getData(), new double[]{3, 5}, TOL); BLAS.axpy(1, 1.0, new double[]{1}, 0, v.getData(), 1); Assert.assertArrayEquals(v.getData(), new double[]{3, 6}, TOL); }
public static void axpy(double a, double[] x, double[] y) { Preconditions.checkArgument(x.length == y.length, "Array dimension mismatched."); F2J_BLAS.daxpy(x.length, a, x, 1, y, 1); }
BLAS { public static void axpy(double a, double[] x, double[] y) { Preconditions.checkArgument(x.length == y.length, "Array dimension mismatched."); F2J_BLAS.daxpy(x.length, a, x, 1, y, 1); } }
BLAS { public static void axpy(double a, double[] x, double[] y) { Preconditions.checkArgument(x.length == y.length, "Array dimension mismatched."); F2J_BLAS.daxpy(x.length, a, x, 1, y, 1); }  }
BLAS { public static void axpy(double a, double[] x, double[] y) { Preconditions.checkArgument(x.length == y.length, "Array dimension mismatched."); F2J_BLAS.daxpy(x.length, a, x, 1, y, 1); }  static double asum(int n, double[] x, int offset); static double asum(DenseVector x); static double asum(SparseVector x); static void axpy(double a, double[] x, double[] y); static void axpy(double a, DenseVector x, DenseVector y); static void axpy(double a, SparseVector x, DenseVector y); static void axpy(double a, Vector x, DenseVector y); static void axpy(double a, DenseMatrix x, DenseMatrix y); static void axpy(int n, double a, double[] x, int xOffset, double[] y, int yOffset); static double dot(double[] x, double[] y); static double dot(DenseVector x, DenseVector y); static void scal(double a, double[] x); static void scal(double a, double[] x, int xOffset, int length); static void scal(double a, DenseVector x); static void scal(double a, SparseVector x); static void scal(double a, DenseMatrix x); static void gemm(double alpha, DenseMatrix matA, boolean transA, DenseMatrix matB, boolean transB,
                            double beta, DenseMatrix matC); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            Vector x, double beta, DenseVector y); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            DenseVector x, double beta, DenseVector y); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            SparseVector x, double beta, DenseVector y); }
BLAS { public static void axpy(double a, double[] x, double[] y) { Preconditions.checkArgument(x.length == y.length, "Array dimension mismatched."); F2J_BLAS.daxpy(x.length, a, x, 1, y, 1); }  static double asum(int n, double[] x, int offset); static double asum(DenseVector x); static double asum(SparseVector x); static void axpy(double a, double[] x, double[] y); static void axpy(double a, DenseVector x, DenseVector y); static void axpy(double a, SparseVector x, DenseVector y); static void axpy(double a, Vector x, DenseVector y); static void axpy(double a, DenseMatrix x, DenseMatrix y); static void axpy(int n, double a, double[] x, int xOffset, double[] y, int yOffset); static double dot(double[] x, double[] y); static double dot(DenseVector x, DenseVector y); static void scal(double a, double[] x); static void scal(double a, double[] x, int xOffset, int length); static void scal(double a, DenseVector x); static void scal(double a, SparseVector x); static void scal(double a, DenseMatrix x); static void gemm(double alpha, DenseMatrix matA, boolean transA, DenseMatrix matB, boolean transB,
                            double beta, DenseMatrix matC); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            Vector x, double beta, DenseVector y); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            DenseVector x, double beta, DenseVector y); static void gemv(double alpha, DenseMatrix matA, boolean transA,
                            SparseVector x, double beta, DenseVector y);  }