@Test public void testGemvSparseTranspose() throws Exception { DenseVector y1 = DenseVector.ones(3); BLAS.gemv(2.0, mat, true, spv1, 0., y1); Assert.assertArrayEquals(new double[]{18, 24, 30}, y1.data, TOL); DenseVector y2 = DenseVector.ones(3); BLAS.gemv(2.0, mat, true, spv1, 1., y2); Assert.assertArrayEquals(new double[]{19, 25, 31}, y2.data, TOL); }
public static void gemv(double alpha, DenseMatrix matA, boolean transA, Vector x, double beta, DenseVector y) { if(x instanceof SparseVector){ gemv(alpha, matA, transA, (SparseVector)x, beta, y); }else{ gemv(alpha, matA, transA, (DenseVector)x, beta, y); } }
BLAS { public static void gemv(double alpha, DenseMatrix matA, boolean transA, Vector x, double beta, DenseVector y) { if(x instanceof SparseVector){ gemv(alpha, matA, transA, (SparseVector)x, beta, y); }else{ gemv(alpha, matA, transA, (DenseVector)x, beta, y); } } }
BLAS { public static void gemv(double alpha, DenseMatrix matA, boolean transA, Vector x, double beta, DenseVector y) { if(x instanceof SparseVector){ gemv(alpha, matA, transA, (SparseVector)x, beta, y); }else{ gemv(alpha, matA, transA, (DenseVector)x, beta, y); } }  }
BLAS { public static void gemv(double alpha, DenseMatrix matA, boolean transA, Vector x, double beta, DenseVector y) { if(x instanceof SparseVector){ gemv(alpha, matA, transA, (SparseVector)x, beta, y); }else{ gemv(alpha, matA, transA, (DenseVector)x, beta, y); } }  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 gemv(double alpha, DenseMatrix matA, boolean transA, Vector x, double beta, DenseVector y) { if(x instanceof SparseVector){ gemv(alpha, matA, transA, (SparseVector)x, beta, y); }else{ gemv(alpha, matA, transA, (DenseVector)x, beta, y); } }  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);  }