Class DenseSemiringVectorOps
java.lang.Object
org.flag4j.linalg.ops.dense.semiring_ops.DenseSemiringVectorOps
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
TdotProduct
(T[] src1, T[] src2) Computes the vector dot product for two vectors.static <T extends Semiring<T>>
voidouterProduct
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors.static <T extends Semiring<T>>
voidouterProductConcurrent
(T[] src1, T[] src2, T[] dest) Computes the vector outer product between two real dense vectors using a concurrent implementation.
-
Method Details
-
dotProduct
Computes the vector dot product for two vectors.- Parameters:
src1
- Entries of the first vector.src2
- Entries of the second vector.- Returns:
- The dot product of the two vectors.
-
outerProduct
Computes the vector outer product between two real dense vectors.- Parameters:
src1
- Entries of first vector.src2
- Entries of second vector.dest
- Array to store the result of the vector outer product (modified).
-
outerProductConcurrent
Computes the vector outer product between two real dense vectors using a concurrent implementation.- Parameters:
src1
- Entries of first vector.src2
- Entries of second vector.dest
- Array to store the result of the vector outer product in (modified). Must have lengthsrc1.length*src2.length
.
-