Package org.flag4j.operations.dense.real
Class RealDenseVectorOperations
java.lang.Object
org.flag4j.operations.dense.real.RealDenseVectorOperations
This class provides low level implementations for several vector operation.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
Minimum number of entries to apply concurrent algorithm for outer product. -
Constructor Summary
-
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.
-
Field Details
-
OUTER_CONCURRENT_THRESHOLD
private static final int OUTER_CONCURRENT_THRESHOLDMinimum number of entries to apply concurrent algorithm for outer product.- See Also:
-
-
Constructor Details
-
RealDenseVectorOperations
private RealDenseVectorOperations()
-
-
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
.
-