Class Tensor_F64

java.lang.Object
deepboof.BaseTensor
deepboof.Tensor<Tensor_F64>
deepboof.tensors.Tensor_F64
All Implemented Interfaces:
ITensor

public class Tensor_F64
extends Tensor<Tensor_F64>
  • Field Details

    • d

      public double[] d
      Storage for tensor data. The tensor is stored in a row-major format.
  • Constructor Details

  • Method Details

    • get

      public double get​(int... coordinate)
    • getAtIndex

      public double getAtIndex​(int index)
    • getDouble

      public double getDouble​(int... coordinate)
      Description copied from class: Tensor
      Accessor function which allows any tensor's element to be read as a double.
      Specified by:
      getDouble in class Tensor<Tensor_F64>
      Parameters:
      coordinate - Coordinate of the element which is to be read
      Returns:
      Tensor elements's value as a double
    • getData

      public java.lang.Object getData()
      Description copied from class: Tensor
      Returns internal array used to store tensor data. Data is stored in a row-major order in a single array.
      Specified by:
      getData in class Tensor<Tensor_F64>
      Returns:
      tensor data.
    • setData

      public void setData​(java.lang.Object data)
      Description copied from class: Tensor
      Used to change the internal array in an abstract way
      Specified by:
      setData in class Tensor<Tensor_F64>
    • innerArrayGrow

      protected void innerArrayGrow​(int N)
      Description copied from class: Tensor
      Re-declare inner array so that it is at least of length N
      Specified by:
      innerArrayGrow in class Tensor<Tensor_F64>
      Parameters:
      N - Desired minimum length of inner array
    • innerArrayLength

      protected int innerArrayLength()
      Description copied from class: Tensor
      Length of inner array as returned by "data.length"
      Specified by:
      innerArrayLength in class Tensor<Tensor_F64>
      Returns:
      Length of inner array
    • create

      public Tensor_F64 create​(int... shape)
      Description copied from class: Tensor
      Creates a tensor of the same type with the specified shape
      Specified by:
      create in class Tensor<Tensor_F64>
      Parameters:
      shape - Shape of the new tensor
      Returns:
      New tensor with the specified shape
    • zero

      public void zero()
      Description copied from class: Tensor
      Sets all elements in the tensor to the value of zero
      Specified by:
      zero in class Tensor<Tensor_F64>
    • getDataType

      public java.lang.Class getDataType()
      Description copied from interface: ITensor
      Class of primitive data type used to store tensor
      Returns:
      Internal data type class.