Idris2Doc : Data.VectorSpace

Data.VectorSpace

(source)

Definitions

interface VectorSpace : Type -> Type
Parameters: v
Methods:
zeroVector : v
  Vector with no magnitude (unit for addition).
(*^) : Double -> v -> v
  Multiplication by a scalar.

Fixity Declaration: infixr operator, level 9
(^/) : v -> Double -> v
  Division by a scalar.

Fixity Declaration: infixl operator, level 9
(^+^) : v -> v -> v
  Vector addition

Fixity Declaration: infixl operator, level 6
(^-^) : v -> v -> v
  Vector subtraction

Fixity Declaration: infixl operator, level 6
negateVector : v -> v
  Vector negation. Addition with a negated vector should
be same as subtraction.
dot : v -> v -> Double
  Dot product (also known as scalar or inner product).
For two vectors, mathematically represented as a = a1,a2,...,an and b = b1,b2,...,bn,
the dot product is a . b = a1*b1 + a2*b2 + ... + an*bn.

Fixity Declaration: infix operator, level 7
norm : v -> Double
  Vector's norm (also known as magnitude).
For a vector represented mathematically
as a = a1,a2,...,an, the norm is the square root of a1^2 + a2^2 + ... + an^2.
normalize : v -> v
  Return a vector with the same origin and orientation (angle),
but such that the norm is one (the unit for multiplication by a scalar).

Implementations:
VectorSpace Double
VectorSpace (Vect n Double)
zeroVector : VectorSpace v => v
  Vector with no magnitude (unit for addition).

Visibility: public export
(*^) : VectorSpace v => Double -> v -> v
  Multiplication by a scalar.

Visibility: public export
Fixity Declaration: infixr operator, level 9
(^/) : VectorSpace v => v -> Double -> v
  Division by a scalar.

Visibility: public export
Fixity Declaration: infixl operator, level 9
(^+^) : VectorSpace v => v -> v -> v
  Vector addition

Visibility: public export
Fixity Declaration: infixl operator, level 6
(^-^) : VectorSpace v => v -> v -> v
  Vector subtraction

Visibility: public export
Fixity Declaration: infixl operator, level 6
negateVector : VectorSpace v => v -> v
  Vector negation. Addition with a negated vector should
be same as subtraction.

Visibility: public export
dot : VectorSpace v => v -> v -> Double
  Dot product (also known as scalar or inner product).
For two vectors, mathematically represented as a = a1,a2,...,an and b = b1,b2,...,bn,
the dot product is a . b = a1*b1 + a2*b2 + ... + an*bn.

Visibility: public export
Fixity Declaration: infix operator, level 7
norm : VectorSpace v => v -> Double
  Vector's norm (also known as magnitude).
For a vector represented mathematically
as a = a1,a2,...,an, the norm is the square root of a1^2 + a2^2 + ... + an^2.

Visibility: public export
normalize : VectorSpace v => v -> v
  Return a vector with the same origin and orientation (angle),
but such that the norm is one (the unit for multiplication by a scalar).

Visibility: public export