To not depend on external libraries and to provide correct, fast, and simple examples of LA usage with quantities we need simple vector and tensor types (up to 3 dimensions) together with the following operations:
a + b - addition where both arguments should be of the same quantity kind and character
a - b - subtraction where both arguments should be of the same quantity kind and character
a % b - modulo where both arguments should be of the same quantity kind and character
a * b - multiplication where one of the arguments has to be a scalar
a / b - division where the divisor has to be scalar
a ⋅ b - dot product of two vectors
a × b - cross product of two vectors
|a| - magnitude of a vector
a ⊗ b - tensor product of two vectors or tensors
a ⋅ b - inner product of two tensors
a ⋅ b - inner product of tensor and vector
a : b - scalar product of two tensors
To not depend on external libraries and to provide correct, fast, and simple examples of LA usage with quantities we need simple vector and tensor types (up to 3 dimensions) together with the following operations:
a + b- addition where both arguments should be of the same quantity kind and charactera - b- subtraction where both arguments should be of the same quantity kind and charactera % b- modulo where both arguments should be of the same quantity kind and charactera * b- multiplication where one of the arguments has to be a scalara / b- division where the divisor has to be scalara ⋅ b- dot product of two vectorsa × b- cross product of two vectors|a|- magnitude of a vectora ⊗ b- tensor product of two vectors or tensorsa ⋅ b- inner product of two tensorsa ⋅ b- inner product of tensor and vectora : b- scalar product of two tensors