hTensor-0.8.0: Multidimensional arrays and simple tensor computations.

MaintainerAlberto Ruiz <>



Exterior Algebra.



(/\) :: Coord t => Tensor t -> Tensor t -> Tensor tSource

The exterior (wedge) product of two tensors. Obtains the union of subspaces.

Implemented as the antisymmetrization of the tensor product.

inner :: Coord t => Tensor t -> Tensor t -> Tensor tSource

Euclidean inner product of multivectors.

leviCivita :: Int -> Tensor DoubleSource

The full antisymmetric tensor of order n (contravariant version).

dual :: Tensor Double -> Tensor DoubleSource

Inner product of a r-vector with the whole space.

dual t = inner (leviCivita n) t

(\/) :: Tensor Double -> Tensor Double -> Tensor DoubleSource

The "meet" operator. Obtains the intersection of subspaces.

a \/ b = dual (dual a /\ dual b)

asMultivector :: Tensor Double -> MultivectorSource

Extract a compact multivector representation from a full antisymmetric tensor.

asMultivector = Multivector.fromTensor.

(We do not check that the tensor is actually antisymmetric.)

fromMultivector :: Int -> Multivector -> Tensor DoubleSource

Create an explicit antisymmetric Tensor from the components of a Multivector of a given grade.