Interface Tensor
- All Known Implementing Classes:
Tensor1D, Tensor2D, Tensor3D, Tensor4D, TensorBase
public interface Tensor
A wrapper for multidimensional array/tensor.
Provides commonly used generic methods for accessing number of dimensions,
number of elements, shape and values/elements.
-
Method Summary
Modifier and TypeMethodDescriptionfloat[]Returns an array of values/elements stored in this tensor.intReturns a number of dimensions of this tensorintReturns a total number of elements in this tensor.shape()Returns a shape of this tensor.
-
Method Details
-
numDimensions
int numDimensions()Returns a number of dimensions of this tensor- Returns:
-
numElements
int numElements()Returns a total number of elements in this tensor.- Returns:
-
shape
-
getValues
float[] getValues()Returns an array of values/elements stored in this tensor.- Returns:
-