public class BLAS extends Object
Constructor and Description |
---|
BLAS() |
Modifier and Type | Method and Description |
---|---|
static double |
asum(DenseVector x)
\sum_i |x_i| .
|
static void |
axpy(double a,
Vector x,
DenseVector y)
y += a * x .
|
static void |
axpy(double a,
Vector x,
DenseVector y,
int k)
y += a * x for the first k dimensions, with the other dimensions unchanged.
|
static double |
dot(Vector x,
Vector y)
Computes the dot of the two vectors (y \dot x).
|
static void |
gemv(double alpha,
DenseMatrix matrix,
boolean transMatrix,
DenseVector x,
double beta,
DenseVector y)
y = alpha * matrix * x + beta * y or y = alpha * (matrix^T) * x + beta * y.
|
static void |
hDot(Vector x,
Vector y)
Computes the hadamard product of the two vectors (y = y \hdot x).
|
static double |
norm(Vector x,
double p)
Calculates the p-norm of the vector x.
|
static double |
norm2(Vector x)
\sqrt(\sum_i x_i * x_i) .
|
static void |
scal(double a,
Vector x)
x = x * a .
|
public static double asum(DenseVector x)
public static void axpy(double a, Vector x, DenseVector y)
public static void axpy(double a, Vector x, DenseVector y, int k)
public static void hDot(Vector x, Vector y)
public static double norm2(Vector x)
public static double norm(Vector x, double p)
public static void scal(double a, Vector x)
public static void gemv(double alpha, DenseMatrix matrix, boolean transMatrix, DenseVector x, double beta, DenseVector y)
alpha
- The alpha value.matrix
- Dense matrix with size m x n.transMatrix
- Whether transposes matrix before multiply.x
- Dense vector with size n.beta
- The beta value.y
- Dense vector with size m.Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.