Copyright | (c) Artur M. Brodzki 2018 |
---|---|
License | BSD3 |
Maintainer | artur@brodzki.org |
Stability | experimental |
Portability | Windows/POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Generic tensor index which may be finitely- or infinitely-dimensional.
Synopsis
Documentation
Tensor index class which may be lower (covariant), upper (contravariant) or indifferent.
indexName :: i -> String Source #
Index name
isCovariant :: i -> Bool Source #
Returns True if index is lower (covariant), False otherwise.
isContravariant :: i -> Bool Source #
Returns True if index is upper (contravariant), False otherwise.
equivI :: i -> i -> Bool Source #
Returns True if two indices are equivalent, thus differs only by name, but share same size and type.
(!=!) :: i -> i -> Bool infixl 2 Source #
Infix equivalent for equiv
. Has low priority equal to 2.
toTIndex :: i -> TIndex Source #
Convert to generic index type
Generic index type finitely- or infinitely-dimensional
Covariant | |
| |
Contravariant | |
|
Instances
Eq TIndex Source # | |
Ord TIndex Source # | Indices can be compared by its name and size | Used to allow to put tensors to typical ordered containers | |
Show TIndex Source # | Show tensor index |
Generic TIndex Source # | |
Index TIndex Source # | Finite index is a Multilinear.Index instance |
type Rep TIndex Source # | |
Defined in Multilinear.Index type Rep TIndex = D1 (MetaData "TIndex" "Multilinear.Index" "multilinear-0.5.0.0-JAkyVGJu3RMGLoRm7N5fIc" False) (C1 (MetaCons "Covariant" PrefixI True) (S1 (MetaSel (Just "indexSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "tIndexName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Contravariant" PrefixI True) (S1 (MetaSel (Just "indexSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "tIndexName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) |