multilinear-0.5.0.0: Comprehensive and efficient (multi)linear algebra implementation.

Copyright(c) Artur M. Brodzki 2018
LicenseBSD3
Maintainerartur@brodzki.org
Stabilityexperimental
PortabilityWindows/POSIX
Safe HaskellNone
LanguageHaskell2010

Multilinear.Index

Description

Generic tensor index which may be finitely- or infinitely-dimensional.

Synopsis

Documentation

class Index i where Source #

Tensor index class which may be lower (covariant), upper (contravariant) or indifferent.

Minimal complete definition

indexName, isCovariant, isContravariant, equivI, toTIndex

Methods

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

Instances
Index TIndex Source #

Finite index is a Multilinear.Index instance

Instance details

Defined in Multilinear.Index

Index Index Source #

Finite index is a Multilinear.Index instance

Instance details

Defined in Multilinear.Index.Finite

data TIndex Source #

Generic index type finitely- or infinitely-dimensional

Instances
Eq TIndex Source # 
Instance details

Defined in Multilinear.Index

Methods

(==) :: TIndex -> TIndex -> Bool #

(/=) :: TIndex -> TIndex -> Bool #

Ord TIndex Source #

Indices can be compared by its name and size |

Used to allow to put tensors to typical ordered containers |

Instance details

Defined in Multilinear.Index

Show TIndex Source #

Show tensor index

Instance details

Defined in Multilinear.Index

Generic TIndex Source # 
Instance details

Defined in Multilinear.Index

Associated Types

type Rep TIndex :: Type -> Type #

Methods

from :: TIndex -> Rep TIndex x #

to :: Rep TIndex x -> TIndex #

Index TIndex Source #

Finite index is a Multilinear.Index instance

Instance details

Defined in Multilinear.Index

type Rep TIndex Source # 
Instance details

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)))