linear-1.20.5: Linear Algebra

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

Linear.V1

Description

1-D Vectors

Synopsis

Documentation

newtype V1 a

A 1-dimensional vector

>>> pure 1 :: V1 Int
V1 1
>>> V1 2 + V1 3
V1 5
>>> V1 2 * V1 3
V1 6
>>> sum (V1 2)
2

Constructors

V1 a 

Instances

Monad V1 
Functor V1 
MonadFix V1 
Applicative V1 
Foldable V1 
Traversable V1 
Generic1 V1 
Distributive V1 
Representable V1 
MonadZip V1 
Serial1 V1 
Traversable1 V1 
Apply V1 
Bind V1 
Foldable1 V1 
Eq1 V1 
Ord1 V1 
Read1 V1 
Show1 V1 
Additive V1 
Metric V1 
R1 V1 
Trace V1 
Affine V1 
Unbox a => Vector Vector (V1 a) 
Unbox a => MVector MVector (V1 a) 
Num r => Coalgebra r (E V1) 
Num r => Algebra r (E V1) 
Bounded a => Bounded (V1 a) 
Eq a => Eq (V1 a) 
Floating a => Floating (V1 a) 
Fractional a => Fractional (V1 a) 
Data a => Data (V1 a) 
Num a => Num (V1 a) 
Ord a => Ord (V1 a) 
Read a => Read (V1 a) 
Show a => Show (V1 a) 
Ix a => Ix (V1 a) 
Generic (V1 a) 
Storable a => Storable (V1 a) 
Binary a => Binary (V1 a) 
Serial a => Serial (V1 a) 
Serialize a => Serialize (V1 a) 
NFData a => NFData (V1 a) 
Hashable a => Hashable (V1 a) 
Unbox a => Unbox (V1 a) 
Ixed (V1 a) 
Epsilon a => Epsilon (V1 a) 
FunctorWithIndex (E V1) V1 
FoldableWithIndex (E V1) V1 
TraversableWithIndex (E V1) V1 
Each (V1 a) (V1 b) a b 
type Rep1 V1 
type Rep V1 = E V1 
type Diff V1 = V1 
data MVector s (V1 a) = MV_V1 (MVector s a) 
type Rep (V1 a) 
data Vector (V1 a) = V_V1 (Vector a) 
type Index (V1 a) = E V1 
type IxValue (V1 a) = a 

class R1 t where

A space that has at least 1 basis vector _x.

Minimal complete definition

Nothing

Methods

_x :: Lens' (t a) a

>>> 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) 

ex :: R1 t => E t