Class CooTensorDot<T extends Semiring<T>>
java.lang.Object
org.flag4j.linalg.ops.TensorDot<T[]>
org.flag4j.linalg.ops.sparse.coo.CooTensorDot<T>
-
Field Summary
Fields inherited from class org.flag4j.linalg.ops.TensorDot
destLength, destShape, newShape1, newShape2, shape1, shape2, src1, src1Axes, src1Dims, src1NewAxes, src2, src2Axes, src2Dims, src2NewAxes
-
Constructor Summary
ConstructorsConstructorDescriptionCooTensorDot
(Shape shape1, T[] src1, int[][] indices1, Shape shape2, T[] src2, int[][] indices2, int[] src1Axes, int[] src2Axes) Constructs a tensor dot product problem for computing the tensor contraction of two tensors over the specified set of axes. -
Method Summary
Methods inherited from class org.flag4j.linalg.ops.TensorDot
getOutputShape, getOutputSize
-
Constructor Details
-
CooTensorDot
public CooTensorDot(Shape shape1, T[] src1, int[][] indices1, Shape shape2, T[] src2, int[][] indices2, int[] src1Axes, int[] src2Axes) Constructs a tensor dot product problem for computing the tensor contraction of two tensors over the specified set of axes. That is, computes the sum of products between the two tensors along the specified set of axes.- Parameters:
shape1
- Shape of the first tensor in the contraction.src1
- Non-zero data of the first tensor in the contraction.indices1
- Non-zero indices of the first tensor in the contraction.shape2
- Shape of the second tensor in the contraction.src2
- Non-zero data of the second tensor in the contraction.indices2
- Non-zero indices of the second tensor in the contraction.src1Axes
- Axes along which to compute products forsrc1
tensor.src2Axes
- Axes along which to compute products forsrc2
tensor.- Throws:
IllegalArgumentException
- Ifsrc1Axes
andsrc2Axes
do not match in length, or if any of the axes are out of bounds for the corresponding tensor. Or, If the two tensors shapes do not match along the specified axes pairwise insrc1Axes
andsrc2Axes
.
-
-
Method Details
-
compute
Computes this tensor dot product as specified in the constructor.
-