Class CooRingTensorOps

java.lang.Object
org.flag4j.linalg.ops.sparse.coo.ring_ops.CooRingTensorOps

public final class CooRingTensorOps extends Object
Utility class for computing ops on sparse COO Ring tensors.
  • Method Details

    • sub

      public static <V extends Ring<V>> SparseTensorData<V> sub(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices)
      Sums two complex sparse COO tensors and stores result in a new COO tensor.
      Parameters:
      shape1 - Shape of the first tensor.
      src1Entries - Non-zero data of the first tensor.
      src1Indices - Non-zero indices of the first tensor.
      shape2 - Shape of the second tensor.
      src2Entries - Non-zero data of the second tensor.
      src2Indices - Non-zero indices of the second tensor.
      Returns:
      The element-wise tensor sum of the two tensors.
      Throws:
      LinearAlgebraException - If the tensors src1 and src2 do not have the same shape.