Interface Tensor<N extends Comparable<N>,T extends Tensor<N,T>>

All Superinterfaces:
Group, Group.Additive<T>, NormedVectorSpace<T,N>, Operation, Operation.Addition<T>, ScalarOperation, ScalarOperation.Multiplication<T,N>, VectorSpace<T,N>
All Known Subinterfaces:
Scalar<N>, SelfDeclaringScalar<S>
All Known Implementing Classes:
Amount, AnyTensor, ArrayBasedTensor, BigScalar, ComplexNumber, ExactDecimal, MatrixTensor, Money, Price, PrimitiveScalar, Quadruple, Quantity, Quaternion, RationalNumber, VectorTensor

public interface Tensor<N extends Comparable<N>,T extends Tensor<N,T>> extends NormedVectorSpace<T,N>
An n:th-rank tensor in m-dimensional space is a mathematical object that has n indices and m^n components and obeys certain transformation rules. Tensors are generalizations of scalars (that have no indices), vectors (that have exactly one index), and matrices (that have exactly two indices) to an arbitrary number of indices.

If all you want is multi-dimesional arrays this interface and its implementations is NOT what you're looking for. In that case just use ArrayAnyD instead.

  • Method Details

    • components

      default long components()
      The total number of scalar components
    • dimensions

      int dimensions()
      The range of the indices that identify the scalar components. Each index of a tensor ranges over the number of dimensions.
    • isSameShape

      default boolean isSameShape(Tensor<?,?> other)
    • rank

      int rank()
      The total number of indices required to uniquely identify each scalar component is called the order, degree or rank of the tensor.