linear-1.16.2: Linear Algebra

Copyright(C) 2012-2013 Edward Kmett,
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell98

Linear.V3

Description

3-D Vectors

Synopsis

Documentation

data V3 a Source

A 3-dimensional vector

Constructors

V3 !a !a !a 

Instances

Monad V3 
Functor V3 
MonadFix V3 
Applicative V3 
Foldable V3 
Traversable V3 
Generic1 V3 
Distributive V3 
Representable V3 
MonadZip V3 
Traversable1 V3 
Foldable1 V3 
Apply V3 
Bind V3 
Additive V3 
Metric V3 
R1 V3 
R2 V3 
R3 V3 
Trace V3 
Affine V3 
Unbox a => Vector Vector (V3 a) 
Unbox a => MVector MVector (V3 a) 
Num r => Coalgebra r (E V3) 
Bounded a => Bounded (V3 a) 
Eq a => Eq (V3 a) 
Fractional a => Fractional (V3 a) 
Data a => Data (V3 a) 
Num a => Num (V3 a) 
Ord a => Ord (V3 a) 
Read a => Read (V3 a) 
Show a => Show (V3 a) 
Ix a => Ix (V3 a) 
Generic (V3 a) 
Storable a => Storable (V3 a) 
NFData a => NFData (V3 a) 
Hashable a => Hashable (V3 a) 
Unbox a => Unbox (V3 a) 
Ixed (V3 a) 
Epsilon a => Epsilon (V3 a) 
FunctorWithIndex (E V3) V3 
FoldableWithIndex (E V3) V3 
TraversableWithIndex (E V3) V3 
Each (V3 a) (V3 b) a b 
Typeable (* -> *) V3 
type Rep1 V3 
type Rep V3 = E V3 
type Diff V3 = V3 
data MVector s (V3 a) = MV_V3 !Int (MVector s a) 
type Rep (V3 a) 
data Vector (V3 a) = V_V3 !Int (Vector a) 
type Index (V3 a) = E V3 
type IxValue (V3 a) = a 

cross :: Num a => V3 a -> V3 a -> V3 a Source

cross product

triple :: Num a => V3 a -> V3 a -> V3 a -> a Source

scalar triple product

class R1 t where Source

A space that has at least 1 basis vector _x.

Minimal complete definition

Nothing

Methods

_x :: Lens' (t a) a Source

>>> V1 2 ^._x
2
>>> V1 2 & _x .~ 3
V1 3

Instances

R1 Identity 
R1 V1 
R1 V2 
R1 V3 
R1 V4 
R1 f => R1 (Point f) 

class R1 t => R2 t where Source

A space that distinguishes 2 orthogonal basis vectors _x and _y, but may have more.

Minimal complete definition

Nothing

Methods

_y :: Lens' (t a) a Source

>>> V2 1 2 ^._y
2
>>> V2 1 2 & _y .~ 3
V2 1 3

_xy :: Lens' (t a) (V2 a) Source

Instances

R2 V2 
R2 V3 
R2 V4 
R2 f => R2 (Point f) 

_yx :: R2 t => Lens' (t a) (V2 a) Source

>>> V2 1 2 ^. _yx
V2 2 1

class R2 t => R3 t where Source

A space that distinguishes 3 orthogonal basis vectors: _x, _y, and _z. (It may have more)

Minimal complete definition

Nothing

Methods

_z :: Lens' (t a) a Source

>>> V3 1 2 3 ^. _z
3

_xyz :: Lens' (t a) (V3 a) Source

Instances

R3 V3 
R3 V4 
R3 f => R3 (Point f) 

_xz :: R3 t => Lens' (t a) (V2 a) Source

_yz :: R3 t => Lens' (t a) (V2 a) Source

_zx :: R3 t => Lens' (t a) (V2 a) Source

_zy :: R3 t => Lens' (t a) (V2 a) Source

_xzy :: R3 t => Lens' (t a) (V3 a) Source

_yxz :: R3 t => Lens' (t a) (V3 a) Source

_yzx :: R3 t => Lens' (t a) (V3 a) Source

_zxy :: R3 t => Lens' (t a) (V3 a) Source

_zyx :: R3 t => Lens' (t a) (V3 a) Source

ex :: R1 t => E t Source

ey :: R2 t => E t Source

ez :: R3 t => E t Source