linear-0.2.0.2: Linear Algebra

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Inferred

Linear.Vector

Description

Operations on free vector spaces.

Synopsis

Documentation

(^+^) :: (Applicative f, Num a) => f a -> f a -> f aSource

Compute the sum of two vectors

gnegate :: (Functor f, Num a) => f a -> f aSource

Compute the negation of a vector

(^-^) :: (Applicative f, Num a) => f a -> f a -> f aSource

Compute the difference between two vectors

(^*) :: (Functor f, Num a) => f a -> a -> f aSource

Compute the right scalar product

(*^) :: (Functor f, Num a) => a -> f a -> f aSource

Compute the left scalar product

(^/) :: (Functor f, Fractional a) => f a -> a -> f aSource

Compute division by a scalar on the right.

lerp :: (Applicative f, Num a) => a -> f a -> f a -> f aSource

Linearly interpolate between two vectors.