HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulenumeric-prelude-0.4.4Haskell98

Algebra.Vector

Abstraction of vectors

  • 2 classes
  • 5 values
classclass C (v :: Type -> Type) where
#

A Module over a ring satisfies:

  a *> (b + c) === a *> b + a *> c
  (a * b) *> c === a *> (b *> c)
  (a + b) *> c === a *> c + b *> c

Methods

  • zero :: C a => v a

    zero element of the vector space

  • (<+>) :: C a => v a -> v a -> v ainfixl 6

    add and subtract elements

  • (*>) :: C a => a -> v a -> v ainfixr 7

    scale a vector by a scalar

Instances13C, …
  • C TDefined in numeric-prelude-0.4.4 · MathObj.LaurentPolynomial
  • C TDefined in numeric-prelude-0.4.4 · MathObj.Matrix
  • C TDefined in numeric-prelude-0.4.4 · MathObj.Polynomial
  • C TDefined in numeric-prelude-0.4.4 · MathObj.PowerSeries
  • C TDefined in numeric-prelude-0.4.4 · MathObj.PowerSeries2
  • C TDefined in numeric-prelude-0.4.4 · Number.Complex
  • C TDefined in numeric-prelude-0.4.4 · Number.Quaternion
  • C []Defined in numeric-prelude-0.4.4 · Algebra.Vector
  • Ord a => C (T a)Defined in numeric-prelude-0.4.4 · MathObj.Algebra
  • Ord i => C (Map i)Defined in numeric-prelude-0.4.4 · MathObj.DiscreteMap · orphan
  • Ord i => C (T i)Defined in numeric-prelude-0.4.4 · Number.Physical
  • C (T a)Defined in numeric-prelude-0.4.4 · Number.SI
  • C ((->) b)Defined in numeric-prelude-0.4.4 · Algebra.Vector
classclass Eq (v :: Type -> Type) where
#

We need a Haskell 98 type class which provides equality test for Vector type constructors.

Methods

Instances1Eq
  • Eq []Defined in numeric-prelude-0.4.4 · Algebra.Vector

Instances for standard type constructors

1 declaration

Related functions

1 declaration
valuelinearComb :: (C a, C v) => [a] -> [v a] -> v a
#

Compute the linear combination of a list of vectors.

Properties

3 declarations