m`      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,(c) Conal Elliott and Justus Sagemller 2017BSD3,conal@conal.net, (@) jsagemue $ uni-koeln.de experimentalSafe&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe 69:;QRT 1Monoid under group addition. Alternative to the Sum in  Data.Monoid , which uses  instead of .Additive group v.&The zero element: identity for '(^+^)' Add vectorsAdditive inverseGroup subtractionSum over several vectors &Application a unary function inside a  'Application a binary function inside a (  !"#$%&   "  !"#$%&66&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe69:;<=DQRT ,Adds inner (dot) products.-Inner/dot product. Vector space v.0Scale a vector1Vector divided by scalar2Vector multiplied by scalar3Linear interpolation between a (when t==0) and b (when t==1).4Linear combination of vectors5NSquare of the length of a vector. Sometimes useful for efficiency. See also 6.6Length of a vector. See also 5.7iVector in same direction as given one but with length of one. If given the zero vector, then return it.8 project u v computes the projection of v onto u.:,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde ,-./012345678./0012,--3456787,--./00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde-7071727(c) Conal Elliott 2008BSD3conal@conal.net experimentalSafe69:;<=DQRTg*Representation of the canonical basis for vhInterpret basis rep as a vectoriExtract coordinatesjeExperimental version. More elegant definitions, and friendly to infinite-dimensional vector spaces.fghijklmnopqrstu4fghijk fghhiijj4kfghhiijjklmnopqrstu&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe569:;<=DQRTwAssociated vector spacexSubtract pointsyPoint plus vectorzPoint minus vector{XSquare of the distance between two points. Sometimes useful for efficiency. See also |.|'Distance between two points. See also {.}*Affine linear interpolation. Varies from p to p' as s varies from 0 to 1. See also 3 (on vector spaces).~Compute an affine combination (weighted average) of points. The first element is used as origin and is weighted such that all coefficients sum to 1. For example,  affineCombo a [(0.3,b), (0.2,c)] is equal to -a .+^ (0.3 *^ (b .-. a) ^+^ 0.2 *^ (c .-. a))and if a, b, and c. were in a vector space would also be equal to "0.5 *^ a ^+^ 0.3 *^ b ^+^ 0.2 *^ c See also 4 (on vector spaces).)vwxyz{|}~ vwyxz{|}~ vwxxyyz{|}~$vwxxyyz{|}~x6y6z6(c) Conal Elliott 2008-2016BSD3conal@conal.net experimentalNone /:DILQR NLinear map, represented as an optional memo-trie from basis to values, where & means the zero map (an optimization).An optional additive value(Function (assumed linear) as linear map.Apply a linear map to a vector.)Evaluate a linear map on a basis element. Handy for  and '(*.*)'.Identity linear mapCompose linear maps:Apply a linear function to each element of a linear map. liftL f l == linear f *.* l, but works more efficiently.nApply a linear binary function (not to be confused with a bilinear function) to each element of a linear map.pApply a linear ternary function (not to be confused with a trilinear function) to each element of a linear map.!19 (c) Conal Elliott 2008BSD3conal@conal.net experimentalNone9:;<=DQRT#Infinitely differentiable functionsTower of derivatives.Constant derivative tower.Map a linear" function over a derivative tower.Map a linear" function over a derivative tower.Apply a linear( binary function over derivative towers.Apply a linear) ternary function over derivative towers.zDifferentiable identity function. Sometimes called "the derivation variable" or similar, but it's not really a variable.`Every linear function has a constant derivative equal to the function itself (as a linear map).Differentiable version of Differentiable version of Derivative tower for applying a binary function that distributes over addition, such as multiplication. A bit weaker assumption than bilinearity. Is bilinearity necessary for correctness here?(Specialized chain rule. See also '(@.)'vSample the derivative at a basis element. Optimized for partial application to save work for non-scalar derivatives."9 40 (c) Conal Elliott 2008BSD3conal@conal.net experimentalNone(c) Conal Elliott 2008BSD3conal@conal.net experimentalNone9:;DQR,Cross product of various forms of 3D vectors,Cross product of various forms of 2D vectorsHomogeneous tripleHomogeneous pair Singleton8Thing with a normal vector (not necessarily normalized).$Normalized normal vector. See also cross.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  (vector-space-0.11-BV843UE5jg9296DfobWPT3Data.AdditiveGroupData.VectorSpace Data.BasisData.AffineSpaceData.LinearMapData.Maclaurin Data.CrossData.VectorSpace.GenericData.DerivativeSumgetSum AdditiveGroupzeroV^+^negateV^-^sumVinSuminSum2$fAdditiveGroup:*:$fAdditiveGroupM1$fAdditiveGroupK1$fAdditiveGroupSum $fMonoidSum$fApplicativeSum $fFunctorSum$fAdditiveGroup:->:$fAdditiveGroupMaybe$fAdditiveGroup(->)$fAdditiveGroup(,,,)$fAdditiveGroup(,,)$fAdditiveGroup(,)$fAdditiveGroupComplex$fAdditiveGroupRatio$fAdditiveGroupCDouble$fAdditiveGroupCFloat$fAdditiveGroupCIntMax$fAdditiveGroupCLLong$fAdditiveGroupCLong$fAdditiveGroupCShort$fAdditiveGroupCInt$fAdditiveGroupCSChar$fAdditiveGroupDouble$fAdditiveGroupFloat$fAdditiveGroupInteger$fAdditiveGroupInt$fAdditiveGroup()$fEqSum$fOrdSum $fReadSum $fShowSum $fBoundedSum InnerSpace<.> VectorSpaceScalar*^^/^*lerp linearCombo magnitudeSq magnitude normalizedproject$fInnerSpace:*:$fInnerSpaceM1$fInnerSpaceK1$fVectorSpace:*:$fVectorSpaceM1$fVectorSpaceK1$fInnerSpaceMaybe$fVectorSpace:->:$fInnerSpace(->)$fVectorSpace(->)$fVectorSpaceMaybe$fInnerSpace(,,,)$fVectorSpace(,,,)$fInnerSpace(,,)$fVectorSpace(,,)$fInnerSpace(,)$fVectorSpace(,)$fInnerSpaceComplex$fVectorSpaceComplex$fInnerSpaceRatio$fVectorSpaceRatio$fInnerSpaceCFloat$fVectorSpaceCFloat$fInnerSpaceCDouble$fVectorSpaceCDouble$fInnerSpaceCIntMax$fVectorSpaceCIntMax$fInnerSpaceCLLong$fVectorSpaceCLLong$fInnerSpaceCLong$fVectorSpaceCLong$fInnerSpaceCShort$fVectorSpaceCShort$fInnerSpaceCInt$fVectorSpaceCInt$fInnerSpaceCSChar$fVectorSpaceCSChar$fInnerSpaceFloat$fVectorSpaceFloat$fInnerSpaceDouble$fVectorSpaceDouble$fInnerSpaceInteger$fVectorSpaceInteger$fInnerSpaceInt$fVectorSpaceIntHasBasisBasis basisValue decompose decompose' recompose $fHasBasis:*: $fHasBasisM1 $fHasBasisK1$fHasBasis(,,) $fHasBasis(,)$fHasBasisRatio$fHasBasisCDouble$fHasBasisDouble$fHasBasisCFloat$fHasBasisFloat AffineSpaceDiff.-..+^.-^ distanceSqdistancealerp affineCombo$fAffineSpace:*:$fAffineSpaceM1$fAffineSpaceK1 $fHasBasisAffineDiffProductSpace#$fAffineSpaceAffineDiffProductSpace"$fInnerSpaceAffineDiffProductSpace#$fVectorSpaceAffineDiffProductSpace%$fAdditiveGroupAffineDiffProductSpace$fHasBasisGenericDiff$fInnerSpaceGenericDiff$fVectorSpaceGenericDiff$fAdditiveGroupGenericDiff$fAffineSpace(->)$fAffineSpace(,,)$fAffineSpace(,)$fAffineSpaceRatio$fAffineSpaceCFloat$fAffineSpaceCDouble$fAffineSpaceCIntMax$fAffineSpaceCLLong$fAffineSpaceCLong$fAffineSpaceCShort$fAffineSpaceCInt$fAffineSpaceCSChar$fAffineSpaceFloat$fAffineSpaceDouble$fAffineSpaceInteger$fAffineSpaceInt$fGenericGenericDiff$fGenericAffineDiffProductSpace:-*exlLexrLforkLfirstLsecondLinlLinrLjoinLlinearinLMapinLMap2inLMap3lapplyatBasisidL*.*liftMSliftMS2liftMS3liftLliftL2liftL3$fVectorSpace:-*$fAdditiveGroup:-*:~>:>DpowVal derivativepureDfmapD<$>>liftD2liftD3idDlinearDfstDsndDdistrib>-< derivAtBasispairDunpairDtripleD untripleD $fFloating:>$fFractional:>$fNum:>$fInnerSpace:>$fVectorSpace:>$fAdditiveGroup:>$fOrd:>$fOrdB:>$fIfB:>$fEq:>$fShow:> HasCross3cross3 HasCross2cross2ThreeTwoOne HasNormal normalVecnormal$fHasNormal(,,) $fHasNormal:> $fHasCross3:>$fHasCross3(,,)$fHasNormal(,)$fHasNormal:>0 $fHasCross2:>$fHasCross2(,)VRepbaseGHC.NumNum~>decomp2unnest3nest3AffineDiffProductSpace GenericDiffGHC.BaseNothingMSumlapply'LMapunLMapLMap'jsumatZfromMS Data.TuplefstsndnoOvsqr