Class TensorInvert

java.lang.Object
org.flag4j.linalg.TensorInvert

public final class TensorInvert extends Object
This utility class provides static methods for computing the 'inverse' of a tensor with respect to some tensor dot product operation.
  • Method Details

    • inv

      @Deprecated public static Tensor inv(Tensor src, int numIndices)
      Deprecated.

      Computes the 'inverse' of a tensor. That is, computes the tensor X=this.tensorInv() such that src.tensorDot(X, numIndices) is the 'identity' tensor for the tensor dot product operation.

      A tensor I is the identity for a tensor dot product if src.tensorDot(I, numIndices).equals(this).

      Parameters:
      src - Tensor to compute inverse of.
      numIndices - The number of first numIndices which are involved in the inverse sum.
      Returns:
      The 'inverse' of this tensor as defined in the above sense.
      Throws:
      IllegalArgumentException - If numIndices is not positive.
    • inv

      public static <T extends AbstractDenseDoubleTensor<T>> T inv(AbstractDenseDoubleTensor<T> src, int numIndices)

      Computes the 'inverse' of a tensor. That is, computes the tensor X=this.tensorInv() such that src.tensorDot(X, numIndices) is the 'identity' tensor for the tensor dot product operation.

      A tensor I is the identity for a tensor dot product if src.tensorDot(I, numIndices).equals(this).

      Parameters:
      src - Tensor to compute inverse of.
      numIndices - The number of first numIndices which are involved in the inverse sum.
      Returns:
      The 'inverse' of this tensor as defined in the above sense.
      Throws:
      IllegalArgumentException - If numIndices is not positive.
    • inv

      @Deprecated public static CTensor inv(CTensor src, int numIndices)
      Deprecated.

      Computes the 'inverse' of a tensor. That is, computes the tensor X=this.tensorInv() such that src.tensorDot(X, numIndices) is the 'identity' tensor for the tensor dot product operation.

      A tensor I is the identity for a tensor dot product if src.tensorDot(I, numIndices).equals(this).

      Parameters:
      src - Tensor to compute inverse of.
      numIndices - The number of first numIndices which are involved in the inverse sum.
      Returns:
      The 'inverse' of this tensor as defined in the above sense.
      Throws:
      IllegalArgumentException - If numIndices is not positive.