!=+3      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Implements tensor index.(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_  multilinear7Generic index type finitely- or infinitely-dimensional  multilinearYTensor index class which may be lower (covariant), upper (contravariant) or indifferent.  multilinear Index name  multilinear=Returns True if index is lower (covariant), False otherwise.  multilinearAReturns True if index is upper (contravariant), False otherwise.  multilineareReturns True if two indices are equivalent, thus differs only by name, but share same size and type.  multilinearInfix equivalent for equiv. Has low priority equal to 2.  multilinearConvert to generic index type  multilinear.Indices can be compared by its name and size |<Used to allow to put tensors to typical ordered containers |  multilinearShow tensor index  multilinear-Finite index is a Multilinear.Index instance    2A (multi)linear algbra library.(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_Q multilinear;Multidimensional array treated as multilinear map - tensor  multilinearEGeneric tensor constructor, using combinator function on its indices  multilinearETensor constructor, that returns tensor with all elments equal to v.  multilinearAccessing tensor elements el ["i","j"] t [4,5]) returns all tensor elements which index i is equal to 4 and index jB is equal to 5. Values of other indices are insignificant If given index value is out of range, then modulo operation is performed: el ["i","j"] t [40 50] = t[40 mod size i, 50 mod size j]  multilinearInfix equivalent for el  multilinearList of all tensor indices  multilinearList of tensor indices names  multilinear=Tensor order - number of covariant and contravariant indices order t = (cv, cov) where cv is number of upper and cov is number of lower indices  multilinear%Return size of index with given name  multilinearKCheck if tensors are equivalent (have same indices but in different order)  multilinearInfix equivalent of  . Has low priority equal to 1. | multilineart $| "ij" "kl"! renames upper indices of tensor t to ij and lower indices to kl  multilinear raise t "i" raises an index i of tensor t  multilinearInfix equivalent of   multilinear lower t "i" lowers an index i of tensor t  multilinearInfix equivalent of  ! multilinearSwitch all indices of tensor t. - upper indices becomes lower and vice versa " multilinearShift tensor index right shiftRight t "i" moves index i of tensor tl one level depeer in recursion. Elements of tensor as indexed with indices names becomes unchanged. RRight shift of an index is equivalent to left shift of its successor in recursion s , if only s exists, so: Given a tensor t[i1,i2,i3,...]: 8shiftRight t "i2" == t[i1,i3,i2,...] == shiftLeft t "i3"# multilinearInfix equivalent of "  t |>> "i" moves index i of tensor t one level depeer in recursion $ multilinearShift tensor index rightmost shiftRightmost t "i" moves index i of tensor tq to the deepest level in recursion. Elements of tensor as indexed with indices names becomes unchanged. % multilinearInfix equivalent of $  t |>>> "i" moves index i of tensor t# to the deepest level in recursion & multilinear]Shift tensor index left. Elements of tensor as indexed with indices names becomes unchanged. shiftLeft t "i" moves index i of tensor t one level up in recursion TLeft shift of an index is equivalent to right shift of its predecessor in recursion p , if only p. exists, so: Given a tensor t[i1,i2,i3,...]: 8shiftLeft t "i3" == t[i1,i3,i2,...] == shiftRight t "i2"' multilinearInfix equivalent to &  t <<| "i" moves index i of tensor t one level up in recursion ( multilinearaShift tensor index leftmost. Elements of tensor as indexed with indices names becomes unchanged. shiftLeftmost t "i" moves index i of tensor t! to the first level in recursion ) multilinearInfix equivalent of (  t <<<| "i" moves index i of tensor t! to the first level in recursion  multilinear-Upper indices names (one character per index) multilinear-Lower indices names (one character per index) multilinearUpper indices sizes multilinearLower indices sizes multilineareCombinator function (f [u1,u2,...] [d1,d2,...] returns a tensor element at t [u1,u2,...] [d1,d2,...]) multilinearGenerated tensor multilinear-Upper indices names (one character per index) multilinear-Lower indices names (one character per index) multilinearUpper indices sizes multilinearLower indices sizes multilinearGenerated tensor! "&#$%'()! "&#$%'() 719 8 8#6%6'6)6 Finite-dimensional tensor index.(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_Yd* multilinear7Index of finite-dimensional tensor with specified size 0 multilinear.Indices can be compared by its name and size |<Used to allow to put tensors to typical ordered containers |1 multilinear-Finite index is a Multilinear.Index instance 2 multilinearShow instance of Finite index *,+-.*,+-.QGeneric implementation of tensor as nested arrays, evaluated in sequential manner(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_#5 multilinear>Tensor defined recursively as scalar or list of other tensors c is type of a container, i is type of index size and a is type of tensor elements 6 multilinearScalar 7 multilinear&Simple, one-dimensional finite tensor 8 multilinearFinite array of other tensors : multilinear Finite index Mutltilinear.Index.Finite of tensor < multilinear+Array of tensors on deeper recursion level  multilinearERROR MESSAGE  multilinearERROR MESSAGE  multilinearERROR MESSAGE  multilinearERROR MESSAGE = multilinear"Return true if tensor is a scalar > multilinear)Return true if tensor is a simple tensor ? multilinear*Return True if tensor is a complex tensor @ multilinearReturn generic tensor index  multilineargReturns sample tensor on deeper recursion level.Used to determine some features common for all tensors A multilineareRecursive indexing on list tensor. If index is greater than index size, performs modulo indexing  t ! i = t[i] B multilinear3Move contravariant indices to lower recursion levelC multilinearQMerge FiniteTensor of Scalars to SimpleFinite tensor for performance improvement D multilinear@Generic map function, which does not require a,b types to be Num multilinearTranspose Vector of Vectors, analogous to Data.List.transpose function. It is assumed, that all vectors on deeper recursion level have the same length. E multilinear8Contracted indices have to be consumed in result tensor. multilinearrApply a tensor operator (here denoted by (+) ) elem by elem, trying to connect as many common indices as possible F multilinearSApply a tensor operator elem by elem and merge scalars to simple tensor at the and G multilinearLZipping two tensors with a combinator, assuming they have the same indices.  multilineardot product of two tensors multilinearcontraction error multilinear zipping errorN multilinearSimple mapping map f t returns tensor t2 in which t2[i1,i2,...] = f t[i1,i2,...] O multilinearFiltering tensor. Filtering multi-dimensional arrray may be dangerous, as we always assume, that on each recursion level, all tensors have the same size (length). To disable invalid filters, filtering is done over indices, not tensor elements. Filter function takes and index name and index value and if it returns True, this index value remains in result tensor. This allows to remove whole columns or rows of eg. a matrix: filter (i n -> i == "a" || i > 10) filters all rows of "a" index (because if i = "a", filter returns True) and for "a" index filter elements with index value <= 10 But this disallow to remove particular matrix element. If for some index all elements are removed, the index itself is removed from tensor. P multilinearFiltering one index of tensor.  multilinearLZip tensors with binary combinator, assuming they have all indices the same T multilinear$Tensors can be divided by each otherU multilinear2Tensors can be added, subtracted and multiplicatedV multilinear Print tensorW multilinearNFData instance A multilineartensor t multilinearindex i multilineartensor t[i] multilinearVector of vectors to transposeE multilinearfirst tensor to contract multilinearsecond tensor to contract multilinearFirst argument of operator multilinearSecond argument of operator multilinear4Operator on tensor elements if indices are different multilinear.Tensor operator called if indices are the same multilinearResult tensor "Scalar x + Scalar y = Scalar x + yF multilinearFirst argument of operator multilinearSecond argument of operator multilinear4Operator on tensor elements if indices are different multilinear.Tensor operator called if indices are the same multilinear Result tensorG multilinearThe zipping combinator multilinearFirst tensor to zip multilinearSecond tensor to zip multilinear&Result tensor Two simple tensors case multilinearFirst dot product argument multilinearSecond dot product argument multilinearResulting dot product multilinear(dot function variant where error occured multilinear$Index of first dot product parameter multilinear%Index of second dot product parameter multilinear Erorr message multilinear-zipT function variant where the error occured multilinear$Index of first dot product parameter multilinear%Index of second dot product parameter multilinear Erorr messageO multilinearfilter function multilineartensor to filterP multilinearIndex name to filter multilinearfilter function multilineartensor to filter56789:;<=>?@ABCDEFGHIJKLMNOPQ56789:;<A=>?@BCDEFGHIJKLMNOPQ 'Re-export default tensor implementation(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_?56789:;<=>?@ABCDEFGHIJKLMNOPQ A (multi)linear algbra library.(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_6! "&#$%'()56789:;<=>?@ABCDEFGHIJKLMNOPQDLinear functional constructors (finitely- or infinitely-dimensional)(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_Z multilinear2Generate linear functional as function of indices [ multilinear=Generate linear functional with all components equal to some v Z multilinearIndex name (one character) multilinearNumber of elements multilinearDGenerator function - returns a linear functional component at index i multilinearGenerated linear functional[ multilinearIndex name (one character) multilinearNumber of elements multilinearValue of each element multilinearGenerated linear functionalZ[Z[QGeneric implementation of tensor as nested arrays, evaluated in sequential manner(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_\#\ multilinear>Tensor defined recursively as scalar or list of other tensors c is type of a container, i is type of index size and a is type of tensor elements ] multilinearScalar ^ multilinear&Simple, one-dimensional finite tensor _ multilinearFinite array of other tensors a multilinear Finite index Mutltilinear.Index.Finite of tensor c multilinear+Array of tensors on deeper recursion level  multilinearERROR MESSAGE  multilinearERROR MESSAGE  multilinearERROR MESSAGE  multilinearERROR MESSAGE d multilinear"Return true if tensor is a scalar e multilinear)Return true if tensor is a simple tensor f multilinear*Return True if tensor is a complex tensor g multilinearReturn generic tensor index  multilineargReturns sample tensor on deeper recursion level.Used to determine some features common for all tensors h multilineareRecursive indexing on list tensor. If index is greater than index size, performs modulo indexing  t ! i = t[i] i multilinear3Move contravariant indices to lower recursion levelj multilinearQMerge FiniteTensor of Scalars to SimpleFinite tensor for performance improvement k multilinear@Generic map function, which does not require a,b types to be Num multilinearTranspose Vector of Vectors, analogous to Data.List.transpose function. It is assumed, that all vectors on deeper recursion level have the same length. l multilinear8Contracted indices have to be consumed in result tensor. multilinearrApply a tensor operator (here denoted by (+) ) elem by elem, trying to connect as many common indices as possible m multilinearSApply a tensor operator elem by elem and merge scalars to simple tensor at the and n multilinearLZipping two tensors with a combinator, assuming they have the same indices.  multilineardot product of two tensors multilinearcontraction error multilinear zipping erroru multilinearSimple mapping map f t returns tensor t2 in which t2[i1,i2,...] = f t[i1,i2,...] v multilinearFiltering tensor. Filtering multi-dimensional arrray may be dangerous, as we always assume, that on each recursion level, all tensors have the same size (length). To disable invalid filters, filtering is done over indices, not tensor elements. Filter function takes and index name and index value and if it returns True, this index value remains in result tensor. This allows to remove whole columns or rows of eg. a matrix: filter (i n -> i == "a" || i > 10) filters all rows of "a" index (because if i = "a", filter returns True) and for "a" index filter elements with index value <= 10 But this disallow to remove particular matrix element. If for some index all elements are removed, the index itself is removed from tensor. w multilinearFiltering one index of tensor.  multilinearLZip tensors with binary combinator, assuming they have all indices the same { multilinear$Tensors can be divided by each other| multilinear2Tensors can be added, subtracted and multiplicated} multilinear Print tensor~ multilinearNFData instance h multilineartensor t multilinearindex i multilineartensor t[i] multilinearVector of vectors to transposel multilinearfirst tensor to contract multilinearsecond tensor to contract multilinearFirst argument of operator multilinearSecond argument of operator multilinear4Operator on tensor elements if indices are different multilinear.Tensor operator called if indices are the same multilinearResult tensor "Scalar x + Scalar y = Scalar x + ym multilinearFirst argument of operator multilinearSecond argument of operator multilinear4Operator on tensor elements if indices are different multilinear.Tensor operator called if indices are the same multilinear Result tensorn multilinearThe zipping combinator multilinearFirst tensor to zip multilinearSecond tensor to zip multilinear&Result tensor Two simple tensors case multilinearFirst dot product argument multilinearSecond dot product argument multilinear1Resulting dot product Two simple tensors product multilinear(dot function variant where error occured multilinear$Index of first dot product parameter multilinear%Index of second dot product parameter multilinear Erorr message multilinear-zipT function variant where the error occured multilinear$Index of first dot product parameter multilinear%Index of second dot product parameter multilinear Erorr messagev multilinearfilter function multilineartensor to filterw multilinearIndex name to filter multilinearfilter function multilineartensor to filter\]^_`abcdefghijklmnopqrstuvwx\]^_`abchdefgijklmnopqrstuvwx9Matrix constructors (finitely- or infinitely dimensional)(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_ multilinear+Generate matrix as function of its indices  multilinear-Generate matrix with all components equal to v  multilineareIndices names (one character per index, first character: rows index, second character: columns index) multilinearNumber of matrix rows multilinearNumber of matrix columns multilinear3Generator function - returns a matrix component at i,j multilinearGenerated matrix multilineareIndices names (one character per index, first character: rows index, second character: columns index) multilinearNumber of matrix rows multilinearNumber of matrix columns multilinearValue of matrix components multilinearGenerated matrix.N-Forms, dot and cross product and determinant(c) Artur M. Brodzki, 2018 GLP-3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_ multilinear+Generate N-form as function of its indices  multilinear-Generate N-form with all components equal to v  multilinear'Indices names (one characted per index) multilinear Indices sizes multilinearGenerator function multilinearGenerated N-form multilinear'Indices names (one characted per index) multilinear Indices sizes multilinearN-form elements value multilinearGenerated N-form <N-Vectors constructors (finitely- or infinitely-dimensional)(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_! multilinear-Generate n-vector as function of its indices  multilinear/Generate n-vector with all components equal to v  multilinear'Indices names (one characted per index) multilinear Indices sizes multilinearGenerator function multilinearGenerated n-vector multilinear'Indices names (one characted per index) multilinear Indices sizes multilinearn-vector elements value multilinearGenerated n-vector :Tensors constructors (finitely- or infinitely-dimensional)(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_)j multilinear*Generate tensor composed of other tensors  multilinear;Upper indices names (one character per index) and its sizes multilinear;Lower indices names (one character per index) and its sizes multilineardGenerator function (f [u1,u2,...] [d1,d2,...] returns a tensor element at t [u1,u2,...] [d1,d2,...]) multilinearGenerated tensor 9Vector constructors (finitely- or infinitely-dimensional)(c) Artur M. Brodzki, 2018 BSD3 artur@brodzki.org  experimental Windows/POSIX None&'17=>?@AMX_3 multilinear'Generate vector as function of indices  multilinear2Generate vector with all components equal to some v  multilinearIndex name (one character) multilinearNumber of elements multilinear9Generator function - returns a vector component at index i multilinearGenerated vector multilinearIndex name (one character) multilinearNumber of elements multilinearValue of each element multilinearGenerated vectorNone&'17=>?@AMX_3  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc !?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc ! ! ! d !efghijklmnoefghijklmnopqrstuvwx*multilinear-0.4.0.0-4pOeX4Mdw3wCdDrdwUPw2pMultilinear.IndexMultilinear.ClassMultilinear.Index.FiniteMultilinear.Generic.SequentialMultilinear.FormMultilinear.Generic.MultiCoreMultilinear.MatrixMultilinear.NFormMultilinear.NVectorMultilinear.TensorMultilinear.VectorMultilinear.Generic MultilinearPaths_multilinearTIndex Covariant Contravariant indexSize tIndexNameIndex indexName isCovariantisContravariantequivI!=!toTIndex $fOrdTIndex $fShowTIndex $fIndexTIndex $fEqTIndex$fGenericTIndex fromIndicesconstel$$|indices indicesNamesordersizeequiv|==|$|raise/\lower\/ transpose shiftRight|>>shiftRightmost|>>> shiftLeft<<| shiftLeftmost<<<| indexName' $fNFDataIndex $fOrdIndex $fIndexIndex $fShowIndex $fEqIndex$fGenericIndexTensorScalar SimpleFinite FiniteTensor scalarValtensorFiniteIndex tensorScalars tensorsFiniteisScalarisSimpleisFiniteTensor tensorIndex! _standardize _mergeScalars_map_contractedIndices _elemByElemzipT.+.-.*+.-.*.mapfilter filterIndexzipWith$fMultilinearTensora$fFloatingTensor$fFractionalTensor $fNumTensor $fShowTensor$fNFDataTensor $fEqTensor$fGenericTensorgenerateincompatibleTypes scalarIndices indexNotFoundtensorOfScalars firstTensor _transpose _elemByElem'dotcontractionErrzipErrzipWith'version getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName