Class RealDenseSetOps

java.lang.Object
org.flag4j.linalg.ops.dense.real.RealDenseSetOps

public final class RealDenseSetOps extends Object
This class contains low-level implementations of setting ops for real dense tensors.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    set(double[] src, Shape shape, double value, int... indices)
    Sets an element of a tensor to the specified value.
    static void
    setValues(double[][] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(double[] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(int[][] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(int[] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(Double[][] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(Double[] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(Integer[][] src, double[] dest)
    Sets the value of this matrix using a 2D array.
    static void
    setValues(Integer[] src, double[] dest)
    Sets the value of this matrix using a 2D array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RealDenseSetOps

      public RealDenseSetOps()
  • Method Details

    • setValues

      public static void setValues(Double[] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(Integer[] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(double[] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(int[] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(Double[][] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(Integer[][] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(double[][] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • setValues

      public static void setValues(int[][] src, double[] dest)
      Sets the value of this matrix using a 2D array.
      Parameters:
      src - New values of the matrix.
      dest - Destination array for values.
      Throws:
      IllegalArgumentException - If the source and destination arrays have different number of total data.
    • set

      public static void set(double[] src, Shape shape, double value, int... indices)
      Sets an element of a tensor to the specified value.
      Parameters:
      src - Elements of the tensor. This will be modified.
      shape - Shape of the tensor.
      value - Value to set specified index to.
      indices - Indices of tensor value to be set.