Copyright | (c) 2019 Tobias Reinhart and Nils Alex |
---|---|
License | MIT |
Maintainer | tobi.reinhart@fau.de, nils.alex@fau.de |
Safe Haskell | None |
Language | Haskell2010 |
This module defines the basic data types and functions of the sparse-tensor package.
The
data type provides the fundamental building block of all further tensor types.
It represents a general tensor that takes Tensor
n k vn
individual indices all belonging
to the same index typ k
and retrieves values of type v
. As such the
type can be thought of representing a single tensor that only features
contravariant indices.Tensor
is internally implemented as an ordered forest with nodes of type Tensor
n k v
and leafs of type k
.v
Additional covariant indices can be incorporated by adjoining leafs of type
to a Tensor
n2 k v
.
This yields the type Tensor
n1 k v
which thus is used to represent the tensors in the traditional sense that include contravariant and covariant indices of the same type, i.e. running over the same index range.Tensor2
n1 n2 k v
Recursively appending further
s as leafs each one with possibly different
index types and different ranks allows the sparse-tensor package cover the treatment of more complicated tensors with an arbitrary number of different indices.Tensor
The
data type directly incorporates its rank in form of a type level natural number Tensor
n
. This results in added type safety when performing the usual
tensor algebra operations. To provide a simple example the addition of two tensors is only meaningful if the ranks of the two tensors coincide. Hence then sparse-tensor package only incorporates an addition of
s with the same type.
Unintentional additions of Tensor
s with different type then immediately yields a type error thus preventing the mistake.Tensor
Furthermore the
type employs a sparse storage paradigm in the sense that when constructing Tensor
s only non zero values must be specified.
Missing values are then taken as vanishing automatically.Tensor
Synopsis
- data IndList n a where
- singletonInd :: a -> IndList 1 a
- (+>) :: Enum a => Int -> IndList (n - 1) a -> IndList n a
- fromList :: forall n. KnownNat n => forall (a :: *). [a] -> Maybe (IndList n a)
- fromListUnsafe :: forall n. KnownNat n => forall (a :: *). [a] -> IndList n a
- headInd :: IndList n a -> a
- tailInd :: IndList n a -> IndList (n - 1) a
- sortInd :: (Ord a, Eq a) => IndList n a -> IndList n a
- updateInd :: Int -> a -> IndList n a -> IndList n a
- type TMap k v = [(k, v)]
- data Tensor n k v where
- type Tensor2 n1 n2 k v = Tensor n1 k (Tensor n2 k v)
- type AbsTensor1 n1 k1 v = Tensor n1 k1 v
- type AbsTensor2 n1 n2 k1 v = Tensor2 n1 n2 k1 v
- type AbsTensor3 n1 n2 n3 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor n3 k2 v)
- type AbsTensor4 n1 n2 n3 n4 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor2 n3 n4 k2 v)
- type AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor n5 k3 v)
- type AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor2 n5 n6 k3 v)
- type AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor n7 k4 v)
- type AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor2 n7 n8 k4 v)
- type STTens n1 n2 v = AbsTensor2 n1 n2 Ind3 v
- type ATens n1 n2 n3 n4 n5 n6 v = AbsTensor6 n1 n2 n3 n4 n5 n6 Ind20 Ind9 Ind3 v
- class (Eq a, Ord a, Enum a) => TIndex a
- newtype Ind3 = Ind3 {}
- newtype Ind9 = Ind9 {}
- newtype Ind20 = Ind20 {}
- class TAdd a where
- class Prod v v' where
- newtype SField a = SField a
- newtype AnsVar a = AnsVar (IntMap a)
- type AnsVarR = AnsVar (SField Rational)
- shiftVarLabels :: Int -> AnsVar a -> AnsVar a
- shiftLabels1 :: Int -> AbsTensor1 n1 k1 (AnsVar a) -> AbsTensor1 n1 k1 (AnsVar a)
- shiftLabels2 :: Int -> AbsTensor2 n1 n2 k1 (AnsVar a) -> AbsTensor2 n1 n2 k1 (AnsVar a)
- shiftLabels3 :: Int -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a)
- shiftLabels4 :: Int -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a)
- shiftLabels5 :: Int -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a)
- shiftLabels6 :: Int -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a)
- shiftLabels7 :: Int -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a)
- shiftLabels8 :: Int -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a)
- newtype CFun a b = CFun (a -> b)
- evalSec :: (Num b, Eq b, Epsilon b) => STTens n1 n2 (CFun a b) -> a -> STTens n1 n2 (SField b)
- newtype SSymbolic = SSymbolic String
- type IndTuple1 n1 k1 = IndList n1 k1
- type IndTuple2 n1 n2 k1 = (IndList n1 k1, IndList n2 k1)
- type IndTuple3 n1 n2 n3 k1 k2 = (IndList n1 k1, IndList n2 k1, IndList n3 k2)
- type IndTuple4 n1 n2 n3 n4 k1 k2 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2)
- type IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3)
- type IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3)
- type IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4)
- type IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4, IndList n8 k4)
- type IndTupleST n1 n2 = (IndList n1 Ind3, IndList n2 Ind3)
- type IndTupleAbs n1 n2 n3 n4 n5 n6 = (IndList n1 Ind20, IndList n2 Ind20, IndList n3 Ind9, IndList n4 Ind9, IndList n5 Ind3, IndList n6 Ind3)
- fromListT :: (TIndex k, TAdd v) => [(IndList n k, v)] -> Tensor n k v
- fromListT1 :: (TIndex k1, TAdd v) => [(IndTuple1 n1 k1, v)] -> AbsTensor1 n1 k1 v
- fromListT2 :: (TIndex k1, TAdd v) => [(IndTuple2 n1 n2 k1, v)] -> AbsTensor2 n1 n2 k1 v
- fromListT3 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple3 n1 n2 n3 k1 k2, v)] -> AbsTensor3 n1 n2 n3 k1 k2 v
- fromListT4 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple4 n1 n2 n3 n4 k1 k2, v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- fromListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- fromListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- fromListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- fromListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- fromListT' :: forall n k v. (TIndex k, TAdd v, KnownNat n) => [([k], v)] -> Tensor n k v
- fromListT1' :: forall n1 k1 v. (KnownNat n1, TIndex k1, TAdd v) => [([k1], v)] -> AbsTensor1 n1 k1 v
- fromListT2' :: forall n1 n2 k1 v. (KnownNat n1, KnownNat n2, TIndex k1, TAdd v) => [(([k1], [k1]), v)] -> AbsTensor2 n1 n2 k1 v
- fromListT3' :: forall n1 n2 n3 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2]), v)] -> AbsTensor3 n1 n2 n3 k1 k2 v
- fromListT4' :: forall n1 n2 n3 n4 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2], [k2]), v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- fromListT5' :: forall n1 n2 n3 n4 n5 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3]), v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- fromListT6' :: forall n1 n2 n3 n4 n5 n6 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3]), v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- fromListT7' :: forall n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4]), v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- fromListT8' :: forall n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4], [k4]), v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- mapTo1 :: (v1 -> v2) -> Tensor n1 k v1 -> Tensor n1 k v2
- mapTo2 :: (v1 -> v2) -> Tensor2 n1 n2 k v1 -> Tensor2 n1 n2 k v2
- mapTo3 :: (v1 -> v2) -> AbsTensor3 n1 n2 n3 k1 k2 v1 -> AbsTensor3 n1 n2 n3 k1 k2 v2
- mapTo4 :: (v1 -> v2) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v1 -> AbsTensor4 n1 n2 n3 n4 k1 k2 v2
- mapTo5 :: (v1 -> v2) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v1 -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v2
- mapTo6 :: (v1 -> v2) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v1 -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v2
- mapTo7 :: (v1 -> v2) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v1 -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v2
- mapTo8 :: (v1 -> v2) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v1 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v2
- (&+) :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -> Tensor n k v
- negateTens :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v
- (&*) :: (TIndex k, Prod v v') => Tensor n k v -> Tensor m k v' -> TProd (Tensor n k v) (Tensor m k v')
- (&-) :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -> Tensor n k v
- (&.) :: (TIndex k, Prod s v) => s -> Tensor n k v -> Tensor n k (TProd s v)
- tensorContr :: (TIndex k, TAdd v) => (Int, Int) -> Tensor2 n1 n2 k v -> Tensor2 (n1 - 1) (n2 - 1) k v
- contrATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 (n1 + 1) (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v
- contrATens2 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 (n3 + 1) (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- contrATens3 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 (n5 + 1) (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- contrATens4 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 (n7 + 1) (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- tensorTrans :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v
- tensorTrans1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- tensorTrans2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- tensorTrans3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- tensorTrans4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- tensorTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- tensorTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- tensorTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- tensorTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- tensorBlockTrans :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v
- tensorBlockTrans1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- tensorBlockTrans2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- tensorBlockTrans3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- tensorBlockTrans4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- tensorBlockTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- tensorBlockTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- tensorBlockTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- tensorBlockTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- resortTens :: (KnownNat n, TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v
- resortTens1 :: (KnownNat n1, TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- resortTens2 :: (KnownNat n2, TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- resortTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- resortTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- resortTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- resortTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- resortTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- resortTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- symTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v
- symATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- symATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- symATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- symATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- symATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- symATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- symATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- symATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- symTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- symATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- symATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- symATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- symATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- symATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- symATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- symATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- symATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- aSymTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v
- aSymATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- aSymATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- aSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- aSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- aSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- aSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- aSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- aSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- aSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- aSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- aSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- aSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- aSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- aSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- aSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- aSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- aSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- symBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v
- symBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- symBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- symBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- symBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- symBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- symBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- symBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- symBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- symBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- symBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- symBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- symBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- symBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- symBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- symBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- symBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- symBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- aSymBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v
- aSymBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- aSymBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- aSymBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- aSymBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- aSymBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- aSymBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- aSymBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- aSymBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- aSymBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- aSymBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- aSymBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- aSymBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- aSymBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- aSymBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- aSymBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- aSymBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- aSymBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicSymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v
- cyclicSymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- cyclicSymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- cyclicSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- cyclicSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- cyclicSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- cyclicSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- cyclicSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- cyclicSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- cyclicSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- cyclicSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- cyclicSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- cyclicSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- cyclicSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- cyclicSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- cyclicSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- cyclicSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicASymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v
- cyclicASymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- cyclicASymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- cyclicASymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- cyclicASymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- cyclicASymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- cyclicASymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- cyclicASymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- cyclicASymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- cyclicASymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- cyclicASymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- cyclicASymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- cyclicASymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- cyclicASymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- cyclicASymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- cyclicASymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- cyclicASymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicASymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicBlockSymTens :: (TIndex k, TAdd v) => [[Int]] -> Tensor n k v -> Tensor n k v
- cyclicBlockSymATens1 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v
- cyclicBlockSymATens2 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v
- cyclicBlockSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- cyclicBlockSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- cyclicBlockSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- cyclicBlockSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- cyclicBlockSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- cyclicBlockSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- cyclicBlockSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [[Int]] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v)
- cyclicBlockSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v)
- cyclicBlockSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v)
- cyclicBlockSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v)
- cyclicBlockSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v)
- cyclicBlockSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v)
- cyclicBlockSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v)
- cyclicBlockSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v)
- cyclicBlockSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v)
- data TensList1 k1 v where
- EmptyTList1 :: TensList1 k1 v
- AppendTList1 :: AbsTensor1 n1 k1 v -> TensList1 k1 v -> TensList1 k1 v
- data TensList2 k1 v where
- EmptyTList2 :: TensList2 k1 v
- AppendTList2 :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v -> TensList2 k1 v
- data TensList3 k1 k2 v where
- EmptyTList3 :: TensList3 k1 k2 v
- AppendTList3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v
- data TensList4 k1 k2 v where
- EmptyTList4 :: TensList4 k1 k2 v
- AppendTList4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v
- data TensList5 k1 k2 k3 v where
- EmptyTList5 :: TensList5 k1 k2 k3 v
- AppendTList5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v
- data TensList6 k1 k2 k3 v where
- EmptyTList6 :: TensList6 k1 k2 k3 v
- AppendTList6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v
- data TensList7 k1 k2 k3 k4 v where
- EmptyTList7 :: TensList7 k1 k2 k3 k4 v
- AppendTList7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v
- data TensList8 k1 k2 k3 k4 v where
- EmptyTList8 :: TensList8 k1 k2 k3 k4 v
- AppendTList8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v
- singletonTList1 :: AbsTensor1 n1 k1 v -> TensList1 k1 v
- singletonTList2 :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v
- singletonTList3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v
- singletonTList4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v
- singletonTList5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v
- singletonTList6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v
- singletonTList7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v
- singletonTList8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v
- (...>) :: AbsTensor1 n1 k1 v -> TensList1 k1 v -> TensList1 k1 v
- (..&>) :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v -> TensList2 k1 v
- (.&.>) :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v
- (.&&>) :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v
- (&..>) :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v
- (&.&>) :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v
- (&&.>) :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v
- (&&&>) :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v
- (...+) :: TensList1 k1 v -> TensList1 k1 v -> TensList1 k1 v
- (..&+) :: TensList2 k1 v -> TensList2 k1 v -> TensList2 k1 v
- (.&.+) :: TensList3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v
- (.&&+) :: TensList4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v
- (&..+) :: TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v
- (&.&+) :: TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v
- (&&.+) :: TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v
- (&&&+) :: TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v
- toListT :: Tensor n k v -> [(IndList n k, v)]
- toListT1 :: AbsTensor1 n1 k1 v -> [(IndTuple1 n1 k1, v)]
- toListT2 :: AbsTensor2 n1 n2 k1 v -> [(IndTuple2 n1 n2 k1, v)]
- toListT3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> [(IndTuple3 n1 n2 n3 k1 k2, v)]
- toListT4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(IndTuple4 n1 n2 n3 n4 k1 k2, v)]
- toListT5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)]
- toListT6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)]
- toListT7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)]
- toListT8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)]
- toListT' :: (TIndex k, TAdd v) => Tensor n k v -> [([Int], v)]
- toListT1' :: (TIndex k1, TAdd v) => AbsTensor1 n1 k1 v -> [([Int], v)]
- toListT2' :: (TIndex k1, TAdd v) => AbsTensor2 n1 n2 k1 v -> [(([Int], [Int]), v)]
- toListT3' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor3 n1 n2 n3 k1 k2 v -> [(([Int], [Int], [Int]), v)]
- toListT4' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(([Int], [Int], [Int], [Int]), v)]
- toListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int]), v)]
- toListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int], [Int]), v)]
- toListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)]
- toListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)]
- toMatListT1' :: (TIndex k1, TAdd a) => AbsTensor1 n1 k1 (AnsVar a) -> [((Int, Int), a)]
- toMatListT2' :: (TIndex k1, TAdd a) => AbsTensor2 n1 n2 k1 (AnsVar a) -> [((Int, Int), a)]
- toMatListT3' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> [((Int, Int), a)]
- toMatListT4' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> [((Int, Int), a)]
- toMatListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)]
- toMatListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)]
- toMatListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)]
- toMatListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)]
- toMatrixT1' :: (TIndex k1, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Matrix Double
- toMatrixT2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Matrix Double
- toMatrixT3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Matrix Double
- toMatrixT4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Matrix Double
- toMatrixT5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double
- toMatrixT6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double
- toMatrixT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double
- toMatrixT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double
- toMatListT1 :: (TIndex k1, TAdd a) => TensList1 k1 (AnsVar a) -> [((Int, Int), a)]
- toMatListT2 :: (TIndex k1, TAdd a) => TensList2 k1 (AnsVar a) -> [((Int, Int), a)]
- toMatListT3 :: (TIndex k1, TIndex k2, TAdd a) => TensList3 k1 k2 (AnsVar a) -> [((Int, Int), a)]
- toMatListT4 :: (TIndex k1, TIndex k2, TAdd a) => TensList4 k1 k2 (AnsVar a) -> [((Int, Int), a)]
- toMatListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)]
- toMatListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)]
- toMatListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)]
- toMatListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)]
- toMatrixT1 :: (TIndex k1, Real a) => TensList1 k1 (AnsVar (SField a)) -> Matrix Double
- toMatrixT2 :: (TIndex k1, Real a) => TensList2 k1 (AnsVar (SField a)) -> Matrix Double
- toMatrixT3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Matrix Double
- toMatrixT4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Matrix Double
- toMatrixT5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double
- toMatrixT6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double
- toMatrixT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double
- toMatrixT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double
- removeZeros :: TAdd v => Tensor n k v -> Tensor n k v
- removeZeros1 :: (TAdd v, TIndex k) => AbsTensor1 n1 k v -> AbsTensor1 n1 k v
- removeZeros2 :: (TAdd v, TIndex k) => AbsTensor2 n1 n2 k v -> AbsTensor2 n1 n2 k v
- removeZeros3 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- removeZeros4 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- removeZeros5 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- removeZeros6 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- removeZeros7 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- removeZeros8 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- evalTens :: (KnownNat n, 1 <= n, TIndex k, TAdd v) => Int -> k -> Tensor n k v -> Tensor (n - 1) k v
- evalTens1 :: (KnownNat n1, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor1 (n1 + 1) k1 v -> AbsTensor1 n1 k1 v
- evalTens2 :: (KnownNat n2, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor2 n1 (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v
- evalTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor3 n1 n2 (n3 + 1) k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v
- evalTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor4 n1 n2 n3 (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v
- evalTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor5 n1 n2 n3 n4 (n5 + 1) k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v
- evalTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor6 n1 n2 n3 n4 n5 (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v
- evalTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor7 n1 n2 n3 n4 n5 n6 (n7 + 1) k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v
- evalTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v
- tensorRank1' :: (TIndex k1, Real a, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Int
- tensorRank2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Int
- tensorRank3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Int
- tensorRank4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Int
- tensorRank5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Int
- tensorRank6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Int
- tensorRank7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int
- tensorRank8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int
- tensorRank1 :: (TIndex k1, Real a) => TensList1 k1 (AnsVar (SField a)) -> Int
- tensorRank2 :: (TIndex k1, Real a) => TensList2 k1 (AnsVar (SField a)) -> Int
- tensorRank3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Int
- tensorRank4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Int
- tensorRank5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Int
- tensorRank6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Int
- tensorRank7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int
- tensorRank8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int
- encodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => Tensor n k v -> ByteString
- decodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => ByteString -> Either String (Tensor n k v)
- partial :: Num a => STTens n1 n2 (CFun [Forward a] (Forward a)) -> STTens n1 (n2 + 1) (CFun [a] a)
- partialSymbolic :: [String] -> STTens n1 n2 SSymbolic -> STTens n1 (n2 + 1) SSymbolic
Tensor Data Types
Length Typed Index List
s provide information regarding their number of indices, i.e. their rank in their type. Consequently when constructing them from lists of indices value pairs and
converting them to such it is advantageous when also these lists contain the additional length information in their type.Tensor
data IndList n a where Source #
Instances
Functor (IndList n) Source # | |
Foldable (IndList n) Source # | |
Defined in Math.Tensor fold :: Monoid m => IndList n m -> m # foldMap :: Monoid m => (a -> m) -> IndList n a -> m # foldr :: (a -> b -> b) -> b -> IndList n a -> b # foldr' :: (a -> b -> b) -> b -> IndList n a -> b # foldl :: (b -> a -> b) -> b -> IndList n a -> b # foldl' :: (b -> a -> b) -> b -> IndList n a -> b # foldr1 :: (a -> a -> a) -> IndList n a -> a # foldl1 :: (a -> a -> a) -> IndList n a -> a # toList :: IndList n a -> [a] # length :: IndList n a -> Int # elem :: Eq a => a -> IndList n a -> Bool # maximum :: Ord a => IndList n a -> a # minimum :: Ord a => IndList n a -> a # | |
Eq a => Eq (IndList n a) Source # | |
Ord a => Ord (IndList n a) Source # | |
Show a => Show (IndList n a) Source # | |
(KnownNat n, Generic a) => Generic (IndList n a) Source # | |
(KnownNat n, Generic a, Serialize a) => Serialize (IndList n a) Source # | |
NFData a => NFData (IndList n a) Source # | |
Defined in Math.Tensor | |
type Rep (IndList n a) Source # | |
Defined in Math.Tensor |
singletonInd :: a -> IndList 1 a Source #
Construct an
that only contains a single value.IndList
(+>) :: Enum a => Int -> IndList (n - 1) a -> IndList n a infixr 5 Source #
Infix synonym for
.Append
fromList :: forall n. KnownNat n => forall (a :: *). [a] -> Maybe (IndList n a) Source #
Construction of a length typed
from an untyped list.IndList
fromListUnsafe :: forall n. KnownNat n => forall (a :: *). [a] -> IndList n a Source #
Construction of a length typed
(partial function).IndList
updateInd :: Int -> a -> IndList n a -> IndList n a Source #
The function replaces the element at index/position specified by its first argument with the element that is specified by its second argument.
The Tensor Type
The basic tensor type
represents a tensor that takes Tensor
n k vn
indices of type k
and maps them to values of type v
.
This type can be thought of as representing a single, purely contravariant tensor that features n
indices.
A general abstract tensor with multiple possibly different indices is obtained by simply adjoining the appropriate number of individual basic tensors.
The
type is internally implemented as ordered forest with nodes being the individual indices and leafs given by the corresponding values.Tensor
data Tensor n k v where Source #
Scalar :: v -> Tensor 0 k v | Constructor of leaf values. |
Tensor :: TMap k (Tensor n k v) -> Tensor (n + 1) k v | |
ZeroTensor :: Tensor n k v | Represents a |
Instances
(TIndex k, Prod SSymbolic v) => Prod SSymbolic (Tensor n k v) Source # | |
(TIndex k, Prod (AnsVar s) v) => Prod (AnsVar s) (Tensor n k v) Source # | |
(TIndex k, Prod (SField s) v) => Prod (SField s) (Tensor n k v) Source # | |
Functor (Tensor n k) Source # | |
(Eq a, Eq k) => Eq (Tensor n k a) Source # | |
(Show a, Show k) => Show (Tensor n k a) Source # | |
KnownNat n => Generic (Tensor n k v) Source # | |
(KnownNat n, Ord k, Serialize k, Serialize v) => Serialize (Tensor n k v) Source # | |
(NFData k, NFData v) => NFData (Tensor n k v) Source # | |
Defined in Math.Tensor | |
(TIndex k, TAdd v) => TAdd (Tensor n k v) Source # | |
(TIndex k, Prod v v') => Prod (Tensor n k v) (Tensor n' k v') Source # | |
type TProd SSymbolic (Tensor n k v) Source # | |
type TProd (AnsVar s) (Tensor n k v) Source # | |
type TProd (SField s) (Tensor n k v) Source # | |
type Rep (Tensor n k v) Source # | |
Defined in Math.Tensor | |
type TProd (Tensor n k v) (Tensor n' k v') Source # | |
The following types are synonyms that are used to represent tensors with multiple different indices. For instance
can be used
to represent any tensor that features two different index types with different index ranges that both appear in contravariant and covariant position.AbsTensor4
type AbsTensor1 n1 k1 v = Tensor n1 k1 v Source #
type AbsTensor2 n1 n2 k1 v = Tensor2 n1 n2 k1 v Source #
type AbsTensor3 n1 n2 n3 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor n3 k2 v) Source #
type AbsTensor4 n1 n2 n3 n4 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor2 n3 n4 k2 v) Source #
type AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor n5 k3 v) Source #
type AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor2 n5 n6 k3 v) Source #
type AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor n7 k4 v) Source #
type AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor2 n7 n8 k4 v) Source #
type STTens n1 n2 v = AbsTensor2 n1 n2 Ind3 v Source #
Type synonym for a
with contravariant and covariant spacetime indices.Tensor
type ATens n1 n2 n3 n4 n5 n6 v = AbsTensor6 n1 n2 n3 n4 n5 n6 Ind20 Ind9 Ind3 v Source #
Type synonym for a
with three different index types ranging from Tensor
0
to 20
, from 0
to 9
and from 0
to 3
each one
appearing contravariantly and covariantly.
Index Type Class
class (Eq a, Ord a, Enum a) => TIndex a Source #
The
type class collects a number of class constraints that any index type must satisfy.TIndex
Instances
TIndex Ind20 Source # | |
Defined in Math.Tensor | |
TIndex Ind9 Source # | |
Defined in Math.Tensor | |
TIndex Ind3 Source # | |
Defined in Math.Tensor |
Newtype wrapper for an index type that is used to represent indices with a range from 0
to 3
.
Newtype wrapper for an index type that is used to represent indices with a range from 0
to 9
.
Newtype wrapper for an index type that is used to represent indices with a from 0
to 20
.
Tensor Value Type Class
Types that any
might use as values must satisfy number like properties, more precisely they must constitute an additive group.
This requirement is encoded in the Tensor
type class.TAdd
Allowing further for the computation of tensor products the
types resemble the structure of the usual graded tensor algebra on the type level.
When computing tensor products of different ranked tensors and also tensors with different value type it is thus necessary that the two Tensor
types provide the
information regarding the explicit type of their product. This is the case if the two value types provide an instance of the Tensor
type class.Prod
If the values of a given tensor are instances of these two type classes also tensor type
itself represents an instance of them.
This allows the use of the basic tensor algebra functions and also many further tensor functions irrespective of the values of a given Tensor
are themselves Tensor
s or represent simple scalar values.Tensor
Type class that encodes the additive group structure of possible
values, i.e. addition, neutral element and existence of inverse elements.
Each possible Tensor
value must allow for these basic group operations and hence be an instance of this type class.Tensor
scaleZero :: a -> Bool Source #
Test whether the given element is zero, i.e. the neutral element.
Addition of two elements.
Maps an element to its additive inverse.
Subtraction of two elements.
class Prod v v' where Source #
Type class for product of two (possibly different) types. The resulting type depends on the types that are given as input.
Instances
Prod SSymbolic SSymbolic Source # | |
Show a => Prod SSymbolic (SField a) Source # | |
(TIndex k, Prod SSymbolic v) => Prod SSymbolic (Tensor n k v) Source # | |
Show a => Prod (SField a) SSymbolic Source # | |
Prod (SField v') (SField v) => Prod (AnsVar (SField v)) (SField v') Source # | |
Prod (SField v) (SField v') => Prod (SField v) (AnsVar (SField v')) Source # | |
Num a => Prod (SField a) (SField a) Source # | |
Num b => Prod (SField b) (CFun a b) Source # | |
(TIndex k, Prod (AnsVar s) v) => Prod (AnsVar s) (Tensor n k v) Source # | |
(TIndex k, Prod (SField s) v) => Prod (SField s) (Tensor n k v) Source # | |
Num b => Prod (CFun a b) (CFun a b) Source # | |
(TIndex k, Prod v v') => Prod (Tensor n k v) (Tensor n' k v') Source # | |
Tensor Value Instances
Scalar Values
Newtype wrapper that is used for representing scalar values.
SField a |
Instances
Linear Variables
The
type represents a basic type for variables that must only occur linearly. As such they
can for instance be used whenever tensorial expression involves a tensor with unknown components. This tensor can then be described as
having values of type AnsVar
a
. The AnsVar
type can for instance be useful when the tensorial expression that involves the AnsVar
with
Tensor
values describes a linear equation system. Using the functions AnsVar
, ... this equation system can
then be transformed into a matrix with columns labeling the individual toMatListT1
s.AnsVar
Instances
Eq a => Eq (AnsVar a) Source # | |
Show a => Show (AnsVar a) Source # | |
Generic (AnsVar a) Source # | |
Serialize a => Serialize (AnsVar a) Source # | |
TAdd a => TAdd (AnsVar a) Source # | |
Prod (SField v') (SField v) => Prod (AnsVar (SField v)) (SField v') Source # | |
Prod (SField v) (SField v') => Prod (SField v) (AnsVar (SField v')) Source # | |
(TIndex k, Prod (AnsVar s) v) => Prod (AnsVar s) (Tensor n k v) Source # | |
type Rep (AnsVar a) Source # | |
Defined in Math.Tensor | |
type TProd (AnsVar (SField v)) (SField v') Source # | |
type TProd (SField v) (AnsVar (SField v')) Source # | |
type TProd (AnsVar s) (Tensor n k v) Source # | |
shiftVarLabels :: Int -> AnsVar a -> AnsVar a Source #
Shifts the labels of the variables that are contained in the
type towards larger index labels by the amount specified.AnsVar
The following functions apply this shift of the variable labels, i.e. the function
to all shiftVarLabels
s that are contained in a AnsVar
.Tensor
shiftLabels1 :: Int -> AbsTensor1 n1 k1 (AnsVar a) -> AbsTensor1 n1 k1 (AnsVar a) Source #
shiftLabels1 s = mapTo1 (shiftVarLabels s)
shiftLabels2 :: Int -> AbsTensor2 n1 n2 k1 (AnsVar a) -> AbsTensor2 n1 n2 k1 (AnsVar a) Source #
shiftLabels2 s = mapTo2 (shiftVarLabels s)
shiftLabels3 :: Int -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) Source #
shiftLabels3 s = mapTo3 (shiftVarLabels s)
shiftLabels4 :: Int -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) Source #
shiftLabels4 s = mapTo4 (shiftVarLabels s)
shiftLabels5 :: Int -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) Source #
shiftLabels5 s = mapTo5 (shiftVarLabels s)
shiftLabels6 :: Int -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) Source #
shiftLabels6 s = mapTo6 (shiftVarLabels s)
shiftLabels7 :: Int -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) Source #
shiftLabels7 s = mapTo7 (shiftVarLabels s)
shiftLabels8 :: Int -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) Source #
shiftLabels8 s = mapTo8 (shiftVarLabels s)
Functions as Values
Type for representation of functions as
values.Tensor
CFun (a -> b) |
Instances
Functor (CFun a) Source # | |
Applicative (CFun a) Source # | |
Num b => Prod (SField b) (CFun a b) Source # | |
Num b => Num (CFun a b) Source # | |
Num b => TAdd (CFun a b) Source # | |
Num b => Prod (CFun a b) (CFun a b) Source # | |
type TProd (SField b) (CFun a b) Source # | |
Defined in Math.Tensor | |
type TProd (CFun a b) (CFun a b) Source # | |
Defined in Math.Tensor |
evalSec :: (Num b, Eq b, Epsilon b) => STTens n1 n2 (CFun a b) -> a -> STTens n1 n2 (SField b) Source #
Symbolic Values
Newtype wrapper for symbolic values. Note that this version does not yet support simplification of symbolic values.
Instances
Eq SSymbolic Source # | |
Num SSymbolic Source # | |
Ord SSymbolic Source # | |
Defined in Math.Tensor | |
Show SSymbolic Source # | |
Generic SSymbolic Source # | |
Serialize SSymbolic Source # | |
TAdd SSymbolic Source # | |
Prod SSymbolic SSymbolic Source # | |
Show a => Prod SSymbolic (SField a) Source # | |
(TIndex k, Prod SSymbolic v) => Prod SSymbolic (Tensor n k v) Source # | |
Show a => Prod (SField a) SSymbolic Source # | |
type Rep SSymbolic Source # | |
Defined in Math.Tensor | |
type TProd SSymbolic SSymbolic Source # | |
Defined in Math.Tensor | |
type TProd SSymbolic (SField a) Source # | |
Defined in Math.Tensor | |
type TProd SSymbolic (Tensor n k v) Source # | |
type TProd (SField a) SSymbolic Source # | |
Defined in Math.Tensor |
Construction of Tensor
s can most easily be constructed from key value list where the keys are tuples of either Tensor
s or simply traditional lists that encode the values of the
various indices and the values then are the corresponding IndList
values. While the construction from tuples of normal lists is certainly more flexible
it lacks the desired type safety that is incorporated when construction is achieved from tuples of length typed Tensor
s.IndList
The following are type synonyms that are frequently for these key value lists.
type IndTuple4 n1 n2 n3 n4 k1 k2 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2) Source #
type IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3) Source #
type IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3) Source #
type IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4) Source #
type IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4, IndList n8 k4) Source #
type IndTupleAbs n1 n2 n3 n4 n5 n6 = (IndList n1 Ind20, IndList n2 Ind20, IndList n3 Ind9, IndList n4 Ind9, IndList n5 Ind3, IndList n6 Ind3) Source #
The following functions employ the construction of different
types from such typed key value lists.Tensor
fromListT1 :: (TIndex k1, TAdd v) => [(IndTuple1 n1 k1, v)] -> AbsTensor1 n1 k1 v Source #
fromListT2 :: (TIndex k1, TAdd v) => [(IndTuple2 n1 n2 k1, v)] -> AbsTensor2 n1 n2 k1 v Source #
fromListT3 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple3 n1 n2 n3 k1 k2, v)] -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
fromListT4 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple4 n1 n2 n3 n4 k1 k2, v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
fromListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
fromListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
fromListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
fromListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
The following functions employ the construction of different
types from un-typed key value lists.Tensor
fromListT1' :: forall n1 k1 v. (KnownNat n1, TIndex k1, TAdd v) => [([k1], v)] -> AbsTensor1 n1 k1 v Source #
fromListT2' :: forall n1 n2 k1 v. (KnownNat n1, KnownNat n2, TIndex k1, TAdd v) => [(([k1], [k1]), v)] -> AbsTensor2 n1 n2 k1 v Source #
fromListT3' :: forall n1 n2 n3 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2]), v)] -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
fromListT4' :: forall n1 n2 n3 n4 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2], [k2]), v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
fromListT5' :: forall n1 n2 n3 n4 n5 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3]), v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
fromListT6' :: forall n1 n2 n3 n4 n5 n6 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3]), v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
fromListT7' :: forall n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4]), v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
fromListT8' :: forall n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4], [k4]), v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
Accessing Deeper Leaf Levels
Given
s with multiple index types, i.e. Tensor
s that themselves have further Tensor
s attached as their leafs, i.e. as their Tensor
s one needs a way of accessing these deeper Scalar
levels. This is precisely achieved by the following functions.
They allow a general function that takes Tensor
s as arguments to be applied to Tensor
s that are attached in deeper levels.Tensor
mapTo1 :: (v1 -> v2) -> Tensor n1 k v1 -> Tensor n1 k v2 Source #
Synonym for fmap
.
applies a function to the values of a tensor.mapTo1
mapTo1 = fmap
mapTo3 :: (v1 -> v2) -> AbsTensor3 n1 n2 n3 k1 k2 v1 -> AbsTensor3 n1 n2 n3 k1 k2 v2 Source #
Maps a function to the 3rd leaf level.
mapTo3 = fmap . fmap . fmap
mapTo4 :: (v1 -> v2) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v1 -> AbsTensor4 n1 n2 n3 n4 k1 k2 v2 Source #
Maps a function to the 4th leaf level.
mapTo4 = fmap . fmap . fmap . fmap
mapTo5 :: (v1 -> v2) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v1 -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v2 Source #
Maps a function to the 5th leaf level.
mapTo5 = fmap . fmap . fmap . fmap . fmap
mapTo6 :: (v1 -> v2) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v1 -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v2 Source #
Maps a function to the 6th leaf level.
mapTo6 = fmap . fmap . fmap . fmap . fmap . fmap
mapTo7 :: (v1 -> v2) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v1 -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v2 Source #
Maps a function to the 7th leaf level.
mapTo7 = fmap . fmap . fmap . fmap . fmap . fmap . fmap
mapTo8 :: (v1 -> v2) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v1 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v2 Source #
Maps a function to the 8th leaf level.
mapTo8 = fmap . fmap . fmap . fmap . fmap . fmap . fmap . fmap
Tensor Algebra
Basic Tensor Algebra Operations
The following functions provide the
type with the structure of the usual tensor algebra.Tensor
(&+) :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -> Tensor n k v infixl 6 Source #
Addition of two arbitrary tensors. The only requirement is that the corresponding values satisfy the
constraint.
In particular this function can also be used for adding tensors that themselves contain tensors as values.TAdd
negateTens :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v Source #
Negation of an arbitrary
. The function uses the required group property of the tensor values to map each value of the tensors to its
additive inverse.Tensor
(&*) :: (TIndex k, Prod v v') => Tensor n k v -> Tensor m k v' -> TProd (Tensor n k v) (Tensor m k v') infixl 7 Source #
tensorContr :: (TIndex k, TAdd v) => (Int, Int) -> Tensor2 n1 n2 k v -> Tensor2 (n1 - 1) (n2 - 1) k v Source #
This functions compute the contraction of a
in two of its indices of the same index type, i.e. the function sets the two indices equal and sums over their whole index range.Tensor
If the indices that are to be contracted do not correspond to the first index type of the given
the following functions can be used.Tensor
contrATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 (n1 + 1) (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v Source #
is a synonym for contrATens1
. It applies the contraction to the 1st index type of a tensor.tensorContr
contrATens1 = tensorContr
contrATens2 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 (n3 + 1) (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
applies the contraction to the 2nd index type of a tensor.contrATens2
contrATens2 = mapTo2 . tensorContr
contrATens3 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 (n5 + 1) (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
applies the contraction to the 3rd index type of a tensor.contrATens3
contrATens3 = mapTo4 . tensorContr
contrATens4 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 (n7 + 1) (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
applies the contraction to the 4th index type of a tensor.contrATens4
contrATens4 = mapTo6 . tensorContr
Rearranging indices
Swapping 2 Indices
If the indices that are to be transposed do not correspond to the first index type of the given
the following functions can be used.Tensor
tensorTrans1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
tensorTrans1 = tensorTrans
tensorTrans2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
tensorTrans2 mapTo1 . tensorTrans
tensorTrans3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
tensorTrans3 = mapTo2 . tensorTrans
tensorTrans4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
tensorTrans4 = mapTo3 tensorTrans
tensorTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
tensorTrans5 = mapTo4 . tensorTrans
tensorTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
tensorTrans6 = mapTo5 . tensorTrans
tensorTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
tensorTrans7 = mapTo6 . tensorTrans
tensorTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
tensorTrans8 = mapTo7 . tensorTrans
Swapping 2 index Blocks
tensorBlockTrans :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v Source #
Swap, i.e. transpose two index blocks in a given
. The two index blocks must be disjoint.Tensor
If the index blocks that are to be transposed do not correspond to the first index type of the given
the following functions can be used.Tensor
tensorBlockTrans1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
tensorBlockTrans1 = tensorBlockTrans
tensorBlockTrans2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
tensorBlockTrans2 = mapTo1 tensorBlockTrans
tensorBlockTrans3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
tensorBlockTrans3 = mapTo2 . tensorBlockTrans
tensorBlockTrans4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
tensorBlockTrans4 = mapTo3 . tensorBlockTrans
tensorBlockTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
tensorBlockTrans5 = mapTo4 . tensorBlockTrans
tensorBlockTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
tensorBlockTrans6 = mapTo5 . tensorBlockTrans
tensorBlockTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
tensorBlockTrans7 = mapTo6 . tensorBlockTrans
tensorBlockTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
tensorBlockTrans8 = mapTo7 tensorBlockTrans
Permuting indices
resortTens :: (KnownNat n, TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v Source #
Completely permute the indices of a given tensor. The new index order is specified by a list '[Int]'
that must be of length given by the
number of indices the tensor contains. The list then specifies in its i-th element the position on which the i-th index of the tensor
shall be sorted.
resortTens [1,2,0,3] (fromListT' [([0,1,2,3],1)] :: Tensor 4 Ind3 Rational) = (fromListT' [([2,0,1,3],1)] :: Tensor 4 Ind3 Rational)
If the indices that are to be permuted do not correspond to the first index type of the given
the following functions can be used.Tensor
resortTens1 :: (KnownNat n1, TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
resortTens1 = resortTens
resortTens2 :: (KnownNat n2, TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
resortTens2 = mapTo1 . resortTens
resortTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
resortTens3 = mapTo2 . resortTens
resortTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
resortTens4 = mapTo3 . resortTens
resortTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
resortTens5 = mapTo4 . resortTens
resortTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
resortTens6 = mapTo5 . resortTens
resortTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
resortTens7 = mapTo6 . resortTens
resortTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
resortTens8 = mapTo7 . resortTens
Symmetrization of Tensors
Pair Symmetrization
symTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v Source #
Basic symmetrization in a pair of contravariant indices of the 1st index type. Usual factors of \( \frac{1}{2} \) are not include in this function. The resulting function hence no longer satisfies the property of
a projection. The following functions apply
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.symTens
If the indices in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
symATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
symATens1 = symTens
symATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
symATens2 = mapTo1 . symTens
symATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
symATens3 = mapTo2 . symTens
symATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
symATens4 = mapTo3 . symTens
symATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
symATens5 = mapTo4 . symTens
symATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
symATens6 = mapTo5 . symTens
symATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
symATens7 = mapTo6 . symTens
symATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
symATens8 = mapTo7 . symTens
symTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
Same functionality as
but including the \( \frac{1}{2} \) in the result and thus defining a projection.
The following functions apply symTens
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.symTensFac
symTensFac inds t = SField (1/2 :: Rational) &. symTens inds t
If the indices in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
symATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
symATensFac1 = symTensFac
symATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
symATensFac2 = mapTo1 . symTensFac
symATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
symATensFac3 = mapTo2 . symTensFac
symATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
symATensFac4 = mapTo3 . symTensFac
symATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
symATensFac5 = mapTo4 . symTensFac
symATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
symATensFac6 = mapTo5 . symTensFac
symATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
symATensFac7 = mapTo6 . symTensFac
symATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
symATensFac8 = mapTo7 . symTensFac
Pair Anti Symmetrization
aSymTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v Source #
Basic anti symmetrization in a pair of contravariant indices of the 1st index type. Usual factors of \( \frac{1}{2} \) are not include in this function. The resulting function hence no longer satisfies the property of
a projection. The following functions apply
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.aSymTens
If the indices in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
aSymATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
aSymATens1 = aSymTens
aSymATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
aSymATens2 = mapTo1 . aSymTens
aSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
aSymATens3 = mapTo2 . aSymTens
aSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
aSymATens4 = mapTo3 . aSymTens
aSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
aSymATens5 = mapTo4 . aSymTens
aSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
aSymATens6 = mapTo5 . aSymTens
aSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
aSymATens7 = mapTo6 . aSymTens
aSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
aSymATens8 = mapTo7 . aSymTens
aSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
Same functionality as
but including the \( \frac{1}{2} \) factors in the result and thus defining a projection.
The following functions apply aSymTens
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.aSymTensFac
aSymTensFac inds t = SField (1/2 :: Rational) &. aSymTens inds t
If the indices in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
aSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
aSymATensFac1 = aSymTensFac
aSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
aSymATensFac2 = mapTo1 . aSymTensFac
aSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
aSymATensFac3 = mapTo2 . aSymTensFac
aSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
aSymATensFac4 = mapTo3 . aSymTensFac
aSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
aSymATensFac5 = mapTo4 . aSymTensFac
aSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
aSymATensFac6 = mapTo5 . aSymTensFac
aSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
aSymATensFac7 = mapTo6 . aSymTensFac
aSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
aSymATensFac8 = mapTo7 . aSymTensFac
Block Exchange Symmetrization
symBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v Source #
Symmetrization w.r.t. the exchange of two blocks of contravariant indices of the 1st index type. The index blocks must be disjoint. These function does not include the usual \( \frac{1}{2} \) factors and thus does not
define a projection. The following functions apply
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.symBlockTens
If the index blocks in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
symBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
symBlockATens1 = symBlockTens
symBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
symBlockATens2 = mapTo1 . symBlockTens
symBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
symBlockATens3 = mapTo2 . symBlockTens
symBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
symBlockATens4 = mapTo3 . symBlockTens
symBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
symBlockATens5 = mapTo4 . symBlockTens
symBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
symBlockATens6 = mapTo5 . symBlockTens
symBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
symBlockATens7 = mapTo6 . symBlockTens
symBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
symBlockATens8 = mapTo7 . symBlockTens
symBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
Same functionality as
but including the usual factors of \( \frac{1}{2} \) in the result and thus defining a projection.
The following functions apply symBlockTens
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.symBlockTensFac
symBlockTensFac inds t = SField (1/2 :: Rational) &. symBlockTens inds t
If the index blocks in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
symBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
symBlockATensFac1 = symBlockTensFac
symBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
symBlockATensFac2 = mapTo1 . symBlockTensFac
symBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
symBlockATensFac3 = mapTo2 . symBlockTensFac
symBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
symBlockATensFac4 = mapTo3 . symBlockTensFac
symBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
symBlockATensFac5 = mapTo4 . symBlockTensFac
symBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
symBlockATensFac6 = mapTo5 . symBlockTensFac
symBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
symBlockATensFac7 = mapTo6 . symBlockTensFac
symBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
symBlockATensFac8 = mapTo7 . symBlockTensFac
Block Exchange Anti Symmetrization
aSymBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v Source #
Anti symmetrization w.r.t. the exchange of two blocks of contravariant indices of the 1st index type. The index blocks must be disjoint. These function does not include the usual \( \frac{1}{2} \) factors and thus does not
define a projection. The following functions apply
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.aSymBlockTens
If the index blocks in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
aSymBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
aSymBlockATens1 = aSymBlockTens
aSymBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
aSymBlockATens2 = mapTo1 . aSymBlockTens
aSymBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
aSymBlockATens3 = mapTo2 . aSymBlockTens
aSymBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
aSymBlockATens4 = mapTo3 . aSymBlockTens
aSymBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
aSymBlockATens5 = mapTo4 . aSymBlockTens
aSymBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
aSymBlockATens6 = mapTo5 . aSymBlockTens
aSymBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
aSymBlockATens7 = mapTo6 . aSymBlockTens
aSymBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
aSymBlockATens8 = mapTo7 . aSymBlockTens
aSymBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
Same functionality as
but including the usual factors of \( \frac{1}{2} \) in the result and thus defining a projection.
The following functions apply aSymBlockTens
to the index types of the deeper leaf levels, i.e. covariant indices of the 1st index type, contravariant indices of the 2nd index type, etc.aSymBlockTensFac
aSymBlockTensFac inds t = SField (1/2 :: Rational) &. aSymBlockTens inds t
If the index blocks in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
aSymBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
aSymBlockATensFac1 = aSymBlockTensFac
aSymBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
aSymBlockATensFac2 = mapTo1 . aSymBlockTensFac
aSymBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
aSymBlockATensFac3 = mapTo2 . aSymBlockTensFac
aSymBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
aSymBlockATensFac4 = mapTo3 . aSymBlockTensFac
aSymBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
aSymBlockATensFac5 = mapTo4 . aSymBlockTensFac
aSymBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
aSymBlockATensFac6 = mapTo5 . aSymBlockTensFac
aSymBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
aSymBlockATensFac7 = mapTo6 . aSymBlockTensFac
aSymBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
aSymBlockATensFac8 = mapTo7 . aSymBlockTensFac
Cyclic Symmetrization
cyclicSymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v Source #
Cyclic symmetrization of the specified subset of contravariant
indices of the first index type. The function does not include
usual factors of \( \frac{1}{i!} \) where \( i \) is the number of indices w.r.t. which the symmetrization is performed.
Further functions that are displayed below apply Tensor
to the various deeper cyclicSymTens
levels.Tensor
If the indices in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicSymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
cyclicSymATens1 = cyclicSymTens
cyclicSymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
cyclicSymATens2 = mapTo1 . cyclicSymTens
cyclicSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
cyclicSymATens3 = mapTo2 . cyclicSymTens
cyclicSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
cyclicSymATens4 = mapTo3 . cyclicSymTens
cyclicSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
cyclicSymATens5 = mapTo4 . cyclicSymTens
cyclicSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
cyclicSymATens6 = mapTo5 . cyclicSymTens
cyclicSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
cyclicSymATens7 = mapTo6 . cyclicSymTens
cyclicSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
cyclicSymATens8 = mapTo7 . cyclicSymTens
cyclicSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
This function provides the same functionality as
with the only difference that it includes the \(\frac{1}{i!}\) factors.
The functions that are further provided apply cyclicSymTens
to deeper cyclicSymTensFac
levels.Tensor
cyclicSymTensFac inds t = fac &. cyclicSymTens inds t
If the indices in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
cyclicSymATensFac1 = cyclicSymTensFac
cyclicSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
cyclicSymATensFac2 = mapTo1 . cyclicSymTensFac
cyclicSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
cyclicSymATensFac3 = mapTo2 . cyclicSymTensFac
cyclicSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
cyclicSymATensFac4 = mapTo3 . cyclicSymTensFac
cyclicSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicSymATensFac5 = mapTo4 . cyclicSymTensFac
cyclicSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicSymATensFac6 = mapTo5 . cyclicSymTensFac
cyclicSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicSymATensFac7 = mapTo6 . cyclicSymTensFac
cyclicSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicSymATensFac8 = mapTo7 . cyclicSymTensFac
Cyclic Anti Symmetrization
cyclicASymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v Source #
Cyclic anti symmetrization of the specified subset of contravariant
indices of the first index type. The function does not include
usual factors of \( \frac{1}{i!} \) where \( i \) is the number of indices w.r.t. which the symmetrization is performed.
Further functions that are displayed below apply Tensor
to the various deeper cyclicASymTens
levels.Tensor
If the indices in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicASymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
cyclicASymATens1 = cyclicASymTens
cyclicASymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
cyclicASymATens2 = mapTo1 . cyclicASymTens
cyclicASymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
cyclicASymATens3 = mapTo2 . cyclicASymTens
cyclicASymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
cyclicASymATens4 = mapTo3 . cyclicASymTens
cyclicASymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
cyclicASymATens5 = mapTo4 . cyclicASymTens
cyclicASymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
cyclicASymATens6 = mapTo5 . cyclicASymTens
cyclicASymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
cyclicASymATens7 = mapTo6 . cyclicASymTens
cyclicASymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
cyclicASymATens8 = mapTo7 . cyclicASymTens
cyclicASymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
This function provides the same functionality as
with the only difference that it includes the \(\frac{1}{i!}\) factors.
The functions that are further provided apply cyclicASymTens
to deeper cyclicASymTensFac
levels.Tensor
cyclicASymTensFac inds t = fac &. cyclicASymTens inds t
If the indices in which the
shall be anti symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicASymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
cyclicASymATensFac1 = cyclicASymTensFac
cyclicASymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
cyclicASymATensFac2 = mapTo1 . cyclicASymTensFac
cyclicASymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
cyclicASymATensFac3 = mapTo2 . cyclicASymTensFac
cyclicASymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
cyclicASymATensFac4 = mapTo3 . cyclicASymTensFac
cyclicASymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicASymATensFac5 = mapTo4 . cyclicASymTensFac
cyclicASymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicASymATensFac6 = mapTo5 . cyclicASymTensFac
cyclicASymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicASymATensFac7 = mapTo6 . cyclicASymTensFac
cyclicASymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicASymATensFac8 = mapTo7 . cyclicASymTensFac
Cyclic Block Symmetrization
cyclicBlockSymTens :: (TIndex k, TAdd v) => [[Int]] -> Tensor n k v -> Tensor n k v Source #
Cyclic block symmetrization, i.e. symmetrization w.r.t. any permutation of the specified index blocks of contravariant indices of the first index type.
Usual factors of \( \frac{1}{i!} \) where \( i \) is the number of index blocks w.r.t. which the symmetrization is performed are not included.
The functions that are displayed further below apply
to the various deeper cyclicBlockSymTens
levels.Tensor
If the index blocks in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicBlockSymATens1 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v Source #
cyclicBlockSymATens1 = cyclicBlockSymTens
cyclicBlockSymATens2 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v Source #
cyclicBlockSymATens2 = mapTo1 . cyclicBlockSymTens
cyclicBlockSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
cyclicBlockSymATens3 = mapTo2 . cyclicBlockSymTens
cyclicBlockSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
cyclicBlockSymATens4 = mapTo3 . cyclicBlockSymTens
cyclicBlockSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
cyclicBlockSymATens5 = mapTo4 . cyclicBlockSymTens
cyclicBlockSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
cyclicBlockSymATens6 = mapTo5 . cyclicBlockSymTens
cyclicBlockSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
cyclicBlockSymATens7 = mapTo6 . cyclicBlockSymTens
cyclicBlockSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
cyclicBlockSymATens8 = mapTo7 . cyclicBlockSymTens
cyclicBlockSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [[Int]] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) Source #
This function provides the same functionality as
with the only difference that it includes the \(\frac{1}{i!}\) factors.
The functions that are further provided apply cyclicBlockSymTens
to deeper cyclicASymTensFac
levels.Tensor
cyclicBlockSymTensFac inds t = fac &. cyclicBlockSymTens inds t
If the index blocks in which the
shall be symmetrized do not correspond to the first index type of the given Tensor
the following functions can be used.Tensor
cyclicBlockSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac1 = cyclicBlockSymTensFac
cyclicBlockSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac2 = mapTo1 . cyclicBlockSymTensFac
cyclicBlockSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac3 = mapTo2 . cyclicBlockSymTensFac
cyclicBlockSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac4 = mapTo3 . cyclicBlockSymTensFac
cyclicBlockSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac5 = mapTo4 . cyclicBlockSymTensFac
cyclicBlockSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac6 = mapTo5 . cyclicBlockSymTensFac
cyclicBlockSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac7 = mapTo6 . cyclicBlockSymTensFac
cyclicBlockSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) Source #
cyclicBlockSymATensFac8 = mapTo7 . cyclicBlockSymTensFac
Tensor Functions
Lists of multiple Tensors
Sometimes it is convenient to collect multiple
s with the same value type. To allow the individual Tensors
s to have different rank these lists are heterogeneous.Tensor
data TensList1 k1 v where Source #
EmptyTList1 :: TensList1 k1 v | |
AppendTList1 :: AbsTensor1 n1 k1 v -> TensList1 k1 v -> TensList1 k1 v |
data TensList2 k1 v where Source #
EmptyTList2 :: TensList2 k1 v | |
AppendTList2 :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v -> TensList2 k1 v |
data TensList3 k1 k2 v where Source #
EmptyTList3 :: TensList3 k1 k2 v | |
AppendTList3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v |
data TensList4 k1 k2 v where Source #
EmptyTList4 :: TensList4 k1 k2 v | |
AppendTList4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v |
data TensList5 k1 k2 k3 v where Source #
EmptyTList5 :: TensList5 k1 k2 k3 v | |
AppendTList5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v |
data TensList6 k1 k2 k3 v where Source #
EmptyTList6 :: TensList6 k1 k2 k3 v | |
AppendTList6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v |
data TensList7 k1 k2 k3 k4 v where Source #
EmptyTList7 :: TensList7 k1 k2 k3 k4 v | |
AppendTList7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v |
data TensList8 k1 k2 k3 k4 v where Source #
EmptyTList8 :: TensList8 k1 k2 k3 k4 v | |
AppendTList8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v |
Construction of a such heterogeneous list with a single
as Entry.Tensor
singletonTList1 :: AbsTensor1 n1 k1 v -> TensList1 k1 v Source #
singletonTList2 :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v Source #
singletonTList3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v Source #
singletonTList4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v Source #
singletonTList5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v Source #
singletonTList6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v Source #
singletonTList7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v Source #
singletonTList8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v Source #
Infix Synonyms for the various constructors such as
, AppendTList1
, etc.AppendTList2
(.&&>) :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v infixr 5 Source #
(&..>) :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v infixr 5 Source #
(&.&>) :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v infixr 5 Source #
(&&.>) :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v infixr 5 Source #
(&&&>) :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v infixr 5 Source #
Combining functions for the separate heterogeneous tensor lists.
(&&.+) :: TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v infixr 5 Source #
(&&&+) :: TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v infixr 5 Source #
Conversion of Tensors
To List
Converting the various
with multiple different index types to such typed lists.Tensors
toListT1 :: AbsTensor1 n1 k1 v -> [(IndTuple1 n1 k1, v)] Source #
toListT2 :: AbsTensor2 n1 n2 k1 v -> [(IndTuple2 n1 n2 k1, v)] Source #
toListT3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> [(IndTuple3 n1 n2 n3 k1 k2, v)] Source #
toListT4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(IndTuple4 n1 n2 n3 n4 k1 k2, v)] Source #
toListT5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)] Source #
toListT6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)] Source #
toListT7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)] Source #
toListT8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)] Source #
toListT' :: (TIndex k, TAdd v) => Tensor n k v -> [([Int], v)] Source #
This function converts a given
to a non-typed index tuple list.Tensor
Converting the various
with multiple different index types to such non-typed lists.Tensors
toListT3' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor3 n1 n2 n3 k1 k2 v -> [(([Int], [Int], [Int]), v)] Source #
toListT4' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(([Int], [Int], [Int], [Int]), v)] Source #
toListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int]), v)] Source #
toListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int], [Int]), v)] Source #
toListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)] Source #
toListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)] Source #
To Matrix
Convert a tensor that stores
values to a matrix where the columns label the variables in AnsVar
and the rows label independent components of the tensor.AnsVar
Convert a
to a sparse matrix assocs list.Tensor
toMatListT1' :: (TIndex k1, TAdd a) => AbsTensor1 n1 k1 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT2' :: (TIndex k1, TAdd a) => AbsTensor2 n1 n2 k1 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT3' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT4' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] Source #
toMatrixT1' :: (TIndex k1, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double Source #
Convert all
of a heterogeneous tensor List to a combined sparse matrix assocs list.Tensors
toMatListT3 :: (TIndex k1, TIndex k2, TAdd a) => TensList3 k1 k2 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT4 :: (TIndex k1, TIndex k2, TAdd a) => TensList4 k1 k2 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] Source #
toMatListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] Source #
Convert all
of a heterogeneous tensor List to a combined HM.Matrix.Tensors
toMatrixT3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double Source #
toMatrixT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double Source #
Tensor utility functions
Removing Zeros
removeZeros :: TAdd v => Tensor n k v -> Tensor n k v Source #
Applying these functions on a given tensor removes all zero values from it. Even if zero values are not included in a given tensor when it is constructed they might occur during computations. If so they are not automatically removed from the tensor.
The following functions allow the removal of zero values of
s with multiple different index types.Tensor
removeZeros1 :: (TAdd v, TIndex k) => AbsTensor1 n1 k v -> AbsTensor1 n1 k v Source #
removeZeros1 = removeZeros
removeZeros2 :: (TAdd v, TIndex k) => AbsTensor2 n1 n2 k v -> AbsTensor2 n1 n2 k v Source #
removeZeros2 = removeZeros . mapTo1 removeZeros
removeZeros3 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
removeZeros3 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros
removeZeros4 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
removeZeros4 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros
removeZeros5 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
removeZeros5 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros
removeZeros6 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
removeZeros6 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros
removeZeros7 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
removeZeros7 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros . mapTo6 removeZeros
removeZeros8 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
removeZeros8 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros . mapTo6 removeZeros . mapTo7 removeZeros
Evaluation
evalTens :: (KnownNat n, 1 <= n, TIndex k, TAdd v) => Int -> k -> Tensor n k v -> Tensor (n - 1) k v Source #
The following functions can be used if the
shall be evaluated for an index type that is different from the first index type of the Tensor
.Tensor
evalTens1 :: (KnownNat n1, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor1 (n1 + 1) k1 v -> AbsTensor1 n1 k1 v Source #
evalTens1 = evalTens
evalTens2 :: (KnownNat n2, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor2 n1 (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v Source #
evalTens2 ind indVal = mapTo1 (evalTens ind indVal)
evalTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor3 n1 n2 (n3 + 1) k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v Source #
evalTens3 ind indVal = mapTo2 (evalTens ind indVal)
evalTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor4 n1 n2 n3 (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v Source #
evalTens4 ind indVal = mapTo3 (evalTens ind indVal)
evalTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor5 n1 n2 n3 n4 (n5 + 1) k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v Source #
evalTens5 ind indVal = mapTo4 (evalTens ind indVal)
evalTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor6 n1 n2 n3 n4 n5 (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v Source #
evalTens6 ind indVal = mapTo5 (evalTens ind indVal)
evalTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor7 n1 n2 n3 n4 n5 n6 (n7 + 1) k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v Source #
evalTens7 ind indVal = mapTo6 (evalTens ind indVal)
evalTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v Source #
evalTens8 ind indVal = mapTo7 (evalTens ind indVal)
Rank Computations
Compute the rank of a tensor of
values. The tensor is converted to a matrix with columns labeling the individual variables that occur in AnsVarR
ansVarR
and rows labeling the independent tensor components. The rank is then computed using hmatrix
subroutines. These functions is for instance useful
when determining the rank of tensorial equations.
Compute the rank of a single
.Tensor
tensorRank1' :: (TIndex k1, Real a, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Int Source #
tensorRank2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Int Source #
tensorRank3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Int Source #
tensorRank4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Int Source #
tensorRank5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Int Source #
tensorRank6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Int Source #
tensorRank7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int Source #
tensorRank8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int Source #
Compute the combined rank of a heterogeneous list of multiple tensors.
tensorRank3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Int Source #
tensorRank4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Int Source #
tensorRank5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Int Source #
tensorRank6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Int Source #
tensorRank7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int Source #
tensorRank8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int Source #
Save and Load Tensors
encodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => Tensor n k v -> ByteString Source #
Utility function to serialize and compress a
into a Tensor
, making use of the ByteString
instance.Serialize
decodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => ByteString -> Either String (Tensor n k v) Source #
Utility function to decompress and de-serialize a
into a ByteString
, making use of the Tensor
instance.Serialize