Class RealDenseVectorOps
java.lang.Object
org.flag4j.linalg.ops.dense.real.RealDenseVectorOps
This class provides low level implementations for several vector operation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Matrix
dispatchOuter
(Vector src1, Vector src2) Dispatches an outer product problem to an appropriate implementation based on the size of the vectors involved.static double
innerProduct
(double[] src1, double[] src2) Computes the vector inner product for two real dense vectors.static double[]
outerProduct
(double[] src1, double[] src2) Computes the vector outer product between two real dense vectors.static double[]
outerProductConcurrent
(double[] src1, double[] src2) Computes the vector outer product between two real dense vectors.
-
Method Details
-
innerProduct
public static double innerProduct(double[] src1, double[] src2) Computes the vector inner product for two real dense vectors.- Parameters:
src1
- Entries of the first vector.src2
- Entries of the second vector.- Returns:
- The inner product of the two vectors.
-
outerProduct
public static double[] outerProduct(double[] src1, double[] src2) Computes the vector outer product between two real dense vectors.- Parameters:
src1
- Entries of first vector.src2
- Entries of second vector.- Returns:
- The matrix resulting from the vector outer product.
-
outerProductConcurrent
public static double[] outerProductConcurrent(double[] src1, double[] src2) Computes the vector outer product between two real dense vectors.- Parameters:
src1
- Entries of first vector.src2
- Entries of second vector.- Returns:
- The matrix resulting from the vector outer product.
-
dispatchOuter
Dispatches an outer product problem to an appropriate implementation based on the size of the vectors involved.- Parameters:
src1
- First vector in outer product.src2
- Second vector in outer product.- Returns:
- The outer product of the two vectors
src1
andsrc2
.
-