Package org.tensorics.core.tensor
Interface Tensor<E>
-
- Type Parameters:
E
- type of the values hold in the tensor.
- All Superinterfaces:
Tensoric<E>
- All Known Subinterfaces:
MappableTensor<V>
,Scalar<V>
,TensorView<V>
- All Known Implementing Classes:
AbstractScalar
,AbstractTensor
,BroadcastedTensorView
,ImmutableDoubleArrayBackedTensor
,ImmutableScalar
,ImmutableTensor
public interface Tensor<E> extends Tensoric<E>
The top interface forTensor
like objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Position
context()
Retrieves the context of the tensor, which is nothing else than a position.Shape
shape()
Retrieves the shape of the tensor.
-
-
-
Method Detail
-
shape
Shape shape()
Retrieves the shape of the tensor. As shape we understand simply the structure of a tensor: Its dimensions and the available positions.Implementations have to take care that the returned value here is never
null
.- Returns:
- the shape of the tensor.
-
context
Position context()
Retrieves the context of the tensor, which is nothing else than a position. As context of the tensor we understand coordinates within a higher dimensional space than than the tensor has itself. This coordinates can e.g. transport information when e.g. a higher-dimensional tensor is split into smaller ones, so that it can potentially be reconstructed afterwards.Implementations have to guarantee that the returned value here is never
null
.- Returns:
- the context of the tensor.
-
-