linear-1.20.4: 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 Source

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

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

ex :: R1 t => E t Source