Yampa-0.10.6.2: Library for programming hybrid systems.

Copyright(c) Antony Courtney and Henrik Nilsson Yale University 2003
LicenseBSD-style (see the LICENSE file in the distribution)
Maintainernilsson@cs.yale.edu
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe
LanguageHaskell98

FRP.Yampa.VectorSpace

Description

Vector space type relation and basic instances.

Documentation

class (Eq a, Floating a) => VectorSpace v a | v -> a where #

Minimal complete definition

zeroVector, (*^), (^+^), dot

Methods

zeroVector :: v #

(*^) :: a -> v -> v infixr 9 #

(^/) :: v -> a -> v infixl 9 #

negateVector :: v -> v #

(^+^) :: v -> v -> v infixl 6 #

(^-^) :: v -> v -> v infixl 6 #

dot :: v -> v -> a infix 7 #

norm :: v -> a #

normalize :: v -> v #

Instances

VectorSpace Double Double # 
VectorSpace Float Float # 
RealFloat a => VectorSpace (Vector2 a) a # 

Methods

zeroVector :: Vector2 a #

(*^) :: a -> Vector2 a -> Vector2 a #

(^/) :: Vector2 a -> a -> Vector2 a #

negateVector :: Vector2 a -> Vector2 a #

(^+^) :: Vector2 a -> Vector2 a -> Vector2 a #

(^-^) :: Vector2 a -> Vector2 a -> Vector2 a #

dot :: Vector2 a -> Vector2 a -> a #

norm :: Vector2 a -> a #

normalize :: Vector2 a -> Vector2 a #

RealFloat a => VectorSpace (Vector3 a) a # 

Methods

zeroVector :: Vector3 a #

(*^) :: a -> Vector3 a -> Vector3 a #

(^/) :: Vector3 a -> a -> Vector3 a #

negateVector :: Vector3 a -> Vector3 a #

(^+^) :: Vector3 a -> Vector3 a -> Vector3 a #

(^-^) :: Vector3 a -> Vector3 a -> Vector3 a #

dot :: Vector3 a -> Vector3 a -> a #

norm :: Vector3 a -> a #

normalize :: Vector3 a -> Vector3 a #

(Eq a, Floating a) => VectorSpace (a, a) a # 

Methods

zeroVector :: (a, a) #

(*^) :: a -> (a, a) -> (a, a) #

(^/) :: (a, a) -> a -> (a, a) #

negateVector :: (a, a) -> (a, a) #

(^+^) :: (a, a) -> (a, a) -> (a, a) #

(^-^) :: (a, a) -> (a, a) -> (a, a) #

dot :: (a, a) -> (a, a) -> a #

norm :: (a, a) -> a #

normalize :: (a, a) -> (a, a) #

(Eq a, Floating a) => VectorSpace (a, a, a) a # 

Methods

zeroVector :: (a, a, a) #

(*^) :: a -> (a, a, a) -> (a, a, a) #

(^/) :: (a, a, a) -> a -> (a, a, a) #

negateVector :: (a, a, a) -> (a, a, a) #

(^+^) :: (a, a, a) -> (a, a, a) -> (a, a, a) #

(^-^) :: (a, a, a) -> (a, a, a) -> (a, a, a) #

dot :: (a, a, a) -> (a, a, a) -> a #

norm :: (a, a, a) -> a #

normalize :: (a, a, a) -> (a, a, a) #

(Eq a, Floating a) => VectorSpace (a, a, a, a) a # 

Methods

zeroVector :: (a, a, a, a) #

(*^) :: a -> (a, a, a, a) -> (a, a, a, a) #

(^/) :: (a, a, a, a) -> a -> (a, a, a, a) #

negateVector :: (a, a, a, a) -> (a, a, a, a) #

(^+^) :: (a, a, a, a) -> (a, a, a, a) -> (a, a, a, a) #

(^-^) :: (a, a, a, a) -> (a, a, a, a) -> (a, a, a, a) #

dot :: (a, a, a, a) -> (a, a, a, a) -> a #

norm :: (a, a, a, a) -> a #

normalize :: (a, a, a, a) -> (a, a, a, a) #

(Eq a, Floating a) => VectorSpace (a, a, a, a, a) a # 

Methods

zeroVector :: (a, a, a, a, a) #

(*^) :: a -> (a, a, a, a, a) -> (a, a, a, a, a) #

(^/) :: (a, a, a, a, a) -> a -> (a, a, a, a, a) #

negateVector :: (a, a, a, a, a) -> (a, a, a, a, a) #

(^+^) :: (a, a, a, a, a) -> (a, a, a, a, a) -> (a, a, a, a, a) #

(^-^) :: (a, a, a, a, a) -> (a, a, a, a, a) -> (a, a, a, a, a) #

dot :: (a, a, a, a, a) -> (a, a, a, a, a) -> a #

norm :: (a, a, a, a, a) -> a #

normalize :: (a, a, a, a, a) -> (a, a, a, a, a) #