^T-V      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalNoneJK 1Monoid under group addition. Alternative to the Sum in  Data.Monoid , which uses V 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 % WXYZ[\]^_`abcdefghijklmnop    WXYZ[\]^_`abcdefghijklmnop&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalNone 36=JK Adds inner (dot) products. Inner/dot product  Vector space v.Scale a vectorVector divided by scalarVector multiplied by scalarLinear interpolation between a (when t==0) and b (when t==1).Linear combination of vectorsNSquare of the length of a vector. Sometimes useful for efficiency. See also .Length of a vector. See also .iVector in same direction as given one but with length of one. If given the zero vector, then return it. project u v computes the projection of v onto u.4 qrstuvwxyz{|}~   1  qrstuvwxyz{|}~ (c) Conal Elliott 2008BSD3conal@conal.net experimentalNone 246=JK*Representation of the canonical basis for vInterpret basis rep as a vectorExtract coordinateseExperimental version. More elegant definitions, and friendly to infinite-dimensional vector spaces. &(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalNone36=KAssociated vector space Subtract points!Point plus vector"Point 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  (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  (on vector spaces). !"#$%&  !"#$%&  !"#$%& !"#$%& !"(c) Conal Elliott 2008-2012BSD3conal@conal.net experimentalNone *3=BJK '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 map0Compose linear maps4:Apply a linear function to each element of a linear map. liftL f l == linear f *.* l, but works more efficiently.5nApply a linear binary function (not to be confused with a bilinear function) to each element of a linear map.6pApply a linear ternary function (not to be confused with a trilinear function) to each element of a linear map.'()*+,-./0123456'()*+,-./0123456')-./0*+,123456('()*+,-./01234560 (c) Conal Elliott 2008BSD3conal@conal.net experimentalNone 2346=JKM7#Infinitely differentiable functions8Tower 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.AzDifferentiable identity function. Sometimes called "the derivation variable" or similar, but it's not really a variable.B`Every linear function has a constant derivative equal to the function itself (as a linear map).CDifferentiable version of DDifferentiable version of EDerivative 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?F(Specialized chain rule. See also '(@.)'GvSample the derivative at a basis element. Optimized for partial application to save work for non-scalar derivatives.#789:;<=>?@ABCDEFGHIJK789:;<=>?@ABCDEFGHIJK89:;G7<=>?@ACDBEFHIJK 789:;<=>?@ABCDEFGHIJK9 >F(c) Conal Elliott 2008BSD3conal@conal.net experimentalNone789:;<=>?@ABCDEFGHIJK(c) Conal Elliott 2008BSD3conal@conal.net experimentalNone234=JKL,Cross product of various forms of 3D vectorsN,Cross product of various forms of 2D vectorsPHomogeneous tripleQHomogeneous pairR SingletonS8Thing with a normal vector (not necessarily normalized).U$Normalized normal vector. See also cross.LMNOPQRSTU LMNOPQRSTU STURQPNOLMLMNOPQRSTU       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~^a^^vector-space-0.10.2Data.AdditiveGroupData.VectorSpace Data.BasisData.AffineSpaceData.LinearMapData.Maclaurin Data.CrossData.DerivativeSumgetSum AdditiveGroupzeroV^+^negateV^-^sumVinSuminSum2 InnerSpace<.> VectorSpaceScalar*^^/^*lerp linearCombo magnitudeSq magnitude normalizedprojectHasBasisBasis basisValue decompose decompose' recompose AffineSpaceDiff.-..+^.-^ distanceSqdistancealerp affineCombo:-*firstLlinearinLMapinLMap2inLMap3lapplyatBasisidL*.*liftMSliftMS2liftMS3liftLliftL2liftL3:~>:>DpowVal derivativepureDfmapD<$>>liftD2liftD3idDlinearDfstDsndDdistrib>-< derivAtBasispairDunpairDtripleD untripleD HasCross3cross3 HasCross2cross2ThreeTwoOne HasNormal normalVecnormalbaseGHC.NumNum~>$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()$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$fVectorSpaceIntdecomp2unnest3nest3$fHasBasis(,,) $fHasBasis(,)$fHasBasisRatio$fHasBasisCDouble$fHasBasisDouble$fHasBasisCFloat$fHasBasisFloat$fAffineSpace(->)$fAffineSpace(,,)$fAffineSpace(,)$fAffineSpaceRatio$fAffineSpaceCFloat$fAffineSpaceFloat$fAffineSpaceCDouble$fAffineSpaceDouble Data.MaybeNothingMSumlapply'LMapunLMapLMap'jsumatZfromMS$fVectorSpace:-* Data.TuplefstsndnoOvsqr $fFloating:>$fFractional:>$fNum:>$fInnerSpace:>$fVectorSpace:>$fAdditiveGroup:>$fOrd:>$fOrdB:>$fIfB:>TFCo:R:BooleanOf:>$fEq:>$fShow:>$fHasNormal(,,) $fHasNormal:> $fHasCross3:>$fHasCross3(,,)$fHasNormal(,)$fHasNormal:>0 $fHasCross2:>$fHasCross2(,)