free-vector-spaces-0.1.5.0: Instantiate the classes from the vector-space package with types from linear

Copyright(c) Justus Sagemüller 2016
LicenseGPL v3
Maintainer(@) sagemueller $ geo.uni-koeln.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.VectorSpace.Free

Contents

Description

 

Synopsis

Supported types

Fixed low dimension

These come from the linear package.

data V0 a :: * -> * #

A 0-dimensional vector

>>> pure 1 :: V0 Int
V0
>>> V0 + V0
V0

Instances

Monad V0 

Methods

(>>=) :: V0 a -> (a -> V0 b) -> V0 b #

(>>) :: V0 a -> V0 b -> V0 b #

return :: a -> V0 a #

fail :: String -> V0 a #

Functor V0 

Methods

fmap :: (a -> b) -> V0 a -> V0 b #

(<$) :: a -> V0 b -> V0 a #

MonadFix V0 

Methods

mfix :: (a -> V0 a) -> V0 a #

Applicative V0 

Methods

pure :: a -> V0 a #

(<*>) :: V0 (a -> b) -> V0 a -> V0 b #

liftA2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

(*>) :: V0 a -> V0 b -> V0 b #

(<*) :: V0 a -> V0 b -> V0 a #

Foldable V0 

Methods

fold :: Monoid m => V0 m -> m #

foldMap :: Monoid m => (a -> m) -> V0 a -> m #

foldr :: (a -> b -> b) -> b -> V0 a -> b #

foldr' :: (a -> b -> b) -> b -> V0 a -> b #

foldl :: (b -> a -> b) -> b -> V0 a -> b #

foldl' :: (b -> a -> b) -> b -> V0 a -> b #

foldr1 :: (a -> a -> a) -> V0 a -> a #

foldl1 :: (a -> a -> a) -> V0 a -> a #

toList :: V0 a -> [a] #

null :: V0 a -> Bool #

length :: V0 a -> Int #

elem :: Eq a => a -> V0 a -> Bool #

maximum :: Ord a => V0 a -> a #

minimum :: Ord a => V0 a -> a #

sum :: Num a => V0 a -> a #

product :: Num a => V0 a -> a #

Traversable V0 

Methods

traverse :: Applicative f => (a -> f b) -> V0 a -> f (V0 b) #

sequenceA :: Applicative f => V0 (f a) -> f (V0 a) #

mapM :: Monad m => (a -> m b) -> V0 a -> m (V0 b) #

sequence :: Monad m => V0 (m a) -> m (V0 a) #

Distributive V0 

Methods

distribute :: Functor f => f (V0 a) -> V0 (f a) #

collect :: Functor f => (a -> V0 b) -> f a -> V0 (f b) #

distributeM :: Monad m => m (V0 a) -> V0 (m a) #

collectM :: Monad m => (a -> V0 b) -> m a -> V0 (m b) #

Representable V0 

Associated Types

type Rep (V0 :: * -> *) :: * #

Methods

tabulate :: (Rep V0 -> a) -> V0 a #

index :: V0 a -> Rep V0 -> a #

Eq1 V0 

Methods

liftEq :: (a -> b -> Bool) -> V0 a -> V0 b -> Bool #

Ord1 V0 

Methods

liftCompare :: (a -> b -> Ordering) -> V0 a -> V0 b -> Ordering #

Read1 V0 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V0 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V0 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V0 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V0 a] #

Show1 V0 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V0 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V0 a] -> ShowS #

MonadZip V0 

Methods

mzip :: V0 a -> V0 b -> V0 (a, b) #

mzipWith :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

munzip :: V0 (a, b) -> (V0 a, V0 b) #

Serial1 V0 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V0 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V0 a) #

Apply V0 

Methods

(<.>) :: V0 (a -> b) -> V0 a -> V0 b #

(.>) :: V0 a -> V0 b -> V0 b #

(<.) :: V0 a -> V0 b -> V0 a #

liftF2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

Affine V0 

Associated Types

type Diff (V0 :: * -> *) :: * -> * #

Methods

(.-.) :: Num a => V0 a -> V0 a -> Diff V0 a #

(.+^) :: Num a => V0 a -> Diff V0 a -> V0 a #

(.-^) :: Num a => V0 a -> Diff V0 a -> V0 a #

Finite V0 

Associated Types

type Size (V0 :: * -> *) :: Nat #

Methods

toV :: V0 a -> V Nat (Size V0) a #

fromV :: V Nat (Size V0) a -> V0 a #

Metric V0 

Methods

dot :: Num a => V0 a -> V0 a -> a #

quadrance :: Num a => V0 a -> a #

qd :: Num a => V0 a -> V0 a -> a #

distance :: Floating a => V0 a -> V0 a -> a #

norm :: Floating a => V0 a -> a #

signorm :: Floating a => V0 a -> V0 a #

Additive V0 

Methods

zero :: Num a => V0 a #

(^+^) :: Num a => V0 a -> V0 a -> V0 a #

(^-^) :: Num a => V0 a -> V0 a -> V0 a #

lerp :: Num a => a -> V0 a -> V0 a -> V0 a #

liftU2 :: (a -> a -> a) -> V0 a -> V0 a -> V0 a #

liftI2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

Bind V0 

Methods

(>>-) :: V0 a -> (a -> V0 b) -> V0 b #

join :: V0 (V0 a) -> V0 a #

Vector Vector (V0 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V0 a) -> m (Vector (V0 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V0 a) -> m (Mutable Vector (PrimState m) (V0 a)) #

basicLength :: Vector (V0 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V0 a) -> Vector (V0 a) #

basicUnsafeIndexM :: Monad m => Vector (V0 a) -> Int -> m (V0 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V0 a) -> Vector (V0 a) -> m () #

elemseq :: Vector (V0 a) -> V0 a -> b -> b #

MVector MVector (V0 a) 

Methods

basicLength :: MVector s (V0 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V0 a) -> MVector s (V0 a) #

basicOverlaps :: MVector s (V0 a) -> MVector s (V0 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V0 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V0 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V0 a -> m (MVector (PrimState m) (V0 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> m (V0 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> V0 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V0 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V0 a) -> V0 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V0 a) -> MVector (PrimState m) (V0 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V0 a) -> MVector (PrimState m) (V0 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> m (MVector (PrimState m) (V0 a)) #

Bounded (V0 a) 

Methods

minBound :: V0 a #

maxBound :: V0 a #

Enum (V0 a) 

Methods

succ :: V0 a -> V0 a #

pred :: V0 a -> V0 a #

toEnum :: Int -> V0 a #

fromEnum :: V0 a -> Int #

enumFrom :: V0 a -> [V0 a] #

enumFromThen :: V0 a -> V0 a -> [V0 a] #

enumFromTo :: V0 a -> V0 a -> [V0 a] #

enumFromThenTo :: V0 a -> V0 a -> V0 a -> [V0 a] #

Eq (V0 a) 

Methods

(==) :: V0 a -> V0 a -> Bool #

(/=) :: V0 a -> V0 a -> Bool #

Floating (V0 a) 

Methods

pi :: V0 a #

exp :: V0 a -> V0 a #

log :: V0 a -> V0 a #

sqrt :: V0 a -> V0 a #

(**) :: V0 a -> V0 a -> V0 a #

logBase :: V0 a -> V0 a -> V0 a #

sin :: V0 a -> V0 a #

cos :: V0 a -> V0 a #

tan :: V0 a -> V0 a #

asin :: V0 a -> V0 a #

acos :: V0 a -> V0 a #

atan :: V0 a -> V0 a #

sinh :: V0 a -> V0 a #

cosh :: V0 a -> V0 a #

tanh :: V0 a -> V0 a #

asinh :: V0 a -> V0 a #

acosh :: V0 a -> V0 a #

atanh :: V0 a -> V0 a #

log1p :: V0 a -> V0 a #

expm1 :: V0 a -> V0 a #

log1pexp :: V0 a -> V0 a #

log1mexp :: V0 a -> V0 a #

Fractional (V0 a) 

Methods

(/) :: V0 a -> V0 a -> V0 a #

recip :: V0 a -> V0 a #

fromRational :: Rational -> V0 a #

Data a => Data (V0 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V0 a -> c (V0 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V0 a) #

toConstr :: V0 a -> Constr #

dataTypeOf :: V0 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V0 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V0 a)) #

gmapT :: (forall b. Data b => b -> b) -> V0 a -> V0 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V0 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V0 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V0 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V0 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

Num (V0 a) 

Methods

(+) :: V0 a -> V0 a -> V0 a #

(-) :: V0 a -> V0 a -> V0 a #

(*) :: V0 a -> V0 a -> V0 a #

negate :: V0 a -> V0 a #

abs :: V0 a -> V0 a #

signum :: V0 a -> V0 a #

fromInteger :: Integer -> V0 a #

Ord (V0 a) 

Methods

compare :: V0 a -> V0 a -> Ordering #

(<) :: V0 a -> V0 a -> Bool #

(<=) :: V0 a -> V0 a -> Bool #

(>) :: V0 a -> V0 a -> Bool #

(>=) :: V0 a -> V0 a -> Bool #

max :: V0 a -> V0 a -> V0 a #

min :: V0 a -> V0 a -> V0 a #

Read (V0 a) 
Show (V0 a) 

Methods

showsPrec :: Int -> V0 a -> ShowS #

show :: V0 a -> String #

showList :: [V0 a] -> ShowS #

Ix (V0 a) 

Methods

range :: (V0 a, V0 a) -> [V0 a] #

index :: (V0 a, V0 a) -> V0 a -> Int #

unsafeIndex :: (V0 a, V0 a) -> V0 a -> Int

inRange :: (V0 a, V0 a) -> V0 a -> Bool #

rangeSize :: (V0 a, V0 a) -> Int #

unsafeRangeSize :: (V0 a, V0 a) -> Int

Generic (V0 a) 

Associated Types

type Rep (V0 a) :: * -> * #

Methods

from :: V0 a -> Rep (V0 a) x #

to :: Rep (V0 a) x -> V0 a #

Storable (V0 a) 

Methods

sizeOf :: V0 a -> Int #

alignment :: V0 a -> Int #

peekElemOff :: Ptr (V0 a) -> Int -> IO (V0 a) #

pokeElemOff :: Ptr (V0 a) -> Int -> V0 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V0 a) #

pokeByteOff :: Ptr b -> Int -> V0 a -> IO () #

peek :: Ptr (V0 a) -> IO (V0 a) #

poke :: Ptr (V0 a) -> V0 a -> IO () #

Binary (V0 a) 

Methods

put :: V0 a -> Put #

get :: Get (V0 a) #

putList :: [V0 a] -> Put #

Serial (V0 a) 

Methods

serialize :: MonadPut m => V0 a -> m () #

deserialize :: MonadGet m => m (V0 a) #

Serialize (V0 a) 

Methods

put :: Putter (V0 a) #

get :: Get (V0 a) #

NFData (V0 a) 

Methods

rnf :: V0 a -> () #

Hashable (V0 a) 

Methods

hashWithSalt :: Int -> V0 a -> Int #

hash :: V0 a -> Int #

Unbox (V0 a) 
Ixed (V0 a) 

Methods

ix :: Index (V0 a) -> Traversal' (V0 a) (IxValue (V0 a)) #

Epsilon (V0 a) 

Methods

nearZero :: V0 a -> Bool #

Num s => FiniteFreeSpace (V0 s) Source # 
Generic1 * V0 

Associated Types

type Rep1 V0 (f :: V0 -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 V0 f a #

to1 :: Rep1 V0 f a -> f a #

FunctorWithIndex (E V0) V0 

Methods

imap :: (E V0 -> a -> b) -> V0 a -> V0 b #

imapped :: (Indexable (E V0) p, Settable f) => p a (f b) -> V0 a -> f (V0 b) #

FoldableWithIndex (E V0) V0 

Methods

ifoldMap :: Monoid m => (E V0 -> a -> m) -> V0 a -> m #

ifolded :: (Indexable (E V0) p, Contravariant f, Applicative f) => p a (f a) -> V0 a -> f (V0 a) #

ifoldr :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

ifoldr' :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl' :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

TraversableWithIndex (E V0) V0 

Methods

itraverse :: Applicative f => (E V0 -> a -> f b) -> V0 a -> f (V0 b) #

itraversed :: (Indexable (E V0) p, Applicative f) => p a (f b) -> V0 a -> f (V0 b) #

Each (V0 a) (V0 b) a b 

Methods

each :: Traversal (V0 a) (V0 b) a b #

type Rep V0 
type Rep V0 = E V0
type Diff V0 
type Diff V0 = V0
type Size V0 
type Size V0 = 0
data MVector s (V0 a) 
data MVector s (V0 a) = MV_V0 Int
type Rep (V0 a) 
type Rep (V0 a) = D1 * (MetaData "V0" "Linear.V0" "linear-1.20.7-89xktLOEAkg6Plva3bgVmn" False) (C1 * (MetaCons "V0" PrefixI False) (U1 *))
data (:->:) (E V0) # 
data (:->:) (E V0) = V0T (V0 a)
data Vector (V0 a) 
data Vector (V0 a) = V_V0 Int
type Index (V0 a) 
type Index (V0 a) = E V0
type IxValue (V0 a) 
type IxValue (V0 a) = a
type Diff (V0 s) # 
type Diff (V0 s) = V0 s
type Basis (V0 s) # 
type Basis (V0 s) = E V0
type Scalar (V0 s) # 
type Scalar (V0 s) = s
type Rep1 * V0 
type Rep1 * V0 = D1 * (MetaData "V0" "Linear.V0" "linear-1.20.7-89xktLOEAkg6Plva3bgVmn" False) (C1 * (MetaCons "V0" PrefixI False) (U1 *))
type Diff (Point V0 s) # 
type Diff (Point V0 s) = V0 s

data 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

Instances

Monad V1 

Methods

(>>=) :: V1 a -> (a -> V1 b) -> V1 b #

(>>) :: V1 a -> V1 b -> V1 b #

return :: a -> V1 a #

fail :: String -> V1 a #

Functor V1 

Methods

fmap :: (a -> b) -> V1 a -> V1 b #

(<$) :: a -> V1 b -> V1 a #

MonadFix V1 

Methods

mfix :: (a -> V1 a) -> V1 a #

Applicative V1 

Methods

pure :: a -> V1 a #

(<*>) :: V1 (a -> b) -> V1 a -> V1 b #

liftA2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

(*>) :: V1 a -> V1 b -> V1 b #

(<*) :: V1 a -> V1 b -> V1 a #

Foldable V1 

Methods

fold :: Monoid m => V1 m -> m #

foldMap :: Monoid m => (a -> m) -> V1 a -> m #

foldr :: (a -> b -> b) -> b -> V1 a -> b #

foldr' :: (a -> b -> b) -> b -> V1 a -> b #

foldl :: (b -> a -> b) -> b -> V1 a -> b #

foldl' :: (b -> a -> b) -> b -> V1 a -> b #

foldr1 :: (a -> a -> a) -> V1 a -> a #

foldl1 :: (a -> a -> a) -> V1 a -> a #

toList :: V1 a -> [a] #

null :: V1 a -> Bool #

length :: V1 a -> Int #

elem :: Eq a => a -> V1 a -> Bool #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

sum :: Num a => V1 a -> a #

product :: Num a => V1 a -> a #

Traversable V1 

Methods

traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) #

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #

mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) #

sequence :: Monad m => V1 (m a) -> m (V1 a) #

Distributive V1 

Methods

distribute :: Functor f => f (V1 a) -> V1 (f a) #

collect :: Functor f => (a -> V1 b) -> f a -> V1 (f b) #

distributeM :: Monad m => m (V1 a) -> V1 (m a) #

collectM :: Monad m => (a -> V1 b) -> m a -> V1 (m b) #

Representable V1 

Associated Types

type Rep (V1 :: * -> *) :: * #

Methods

tabulate :: (Rep V1 -> a) -> V1 a #

index :: V1 a -> Rep V1 -> a #

Eq1 V1 

Methods

liftEq :: (a -> b -> Bool) -> V1 a -> V1 b -> Bool #

Ord1 V1 

Methods

liftCompare :: (a -> b -> Ordering) -> V1 a -> V1 b -> Ordering #

Read1 V1 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V1 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V1 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V1 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V1 a] #

Show1 V1 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V1 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V1 a] -> ShowS #

MonadZip V1 

Methods

mzip :: V1 a -> V1 b -> V1 (a, b) #

mzipWith :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

munzip :: V1 (a, b) -> (V1 a, V1 b) #

Serial1 V1 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V1 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V1 a) #

Apply V1 

Methods

(<.>) :: V1 (a -> b) -> V1 a -> V1 b #

(.>) :: V1 a -> V1 b -> V1 b #

(<.) :: V1 a -> V1 b -> V1 a #

liftF2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Traversable1 V1 

Methods

traverse1 :: Apply f => (a -> f b) -> V1 a -> f (V1 b) #

sequence1 :: Apply f => V1 (f b) -> f (V1 b) #

Affine V1 

Associated Types

type Diff (V1 :: * -> *) :: * -> * #

Methods

(.-.) :: Num a => V1 a -> V1 a -> Diff V1 a #

(.+^) :: Num a => V1 a -> Diff V1 a -> V1 a #

(.-^) :: Num a => V1 a -> Diff V1 a -> V1 a #

R1 V1 

Methods

_x :: Functor f => (a -> f a) -> V1 a -> f (V1 a) #

Finite V1 

Associated Types

type Size (V1 :: * -> *) :: Nat #

Methods

toV :: V1 a -> V Nat (Size V1) a #

fromV :: V Nat (Size V1) a -> V1 a #

Metric V1 

Methods

dot :: Num a => V1 a -> V1 a -> a #

quadrance :: Num a => V1 a -> a #

qd :: Num a => V1 a -> V1 a -> a #

distance :: Floating a => V1 a -> V1 a -> a #

norm :: Floating a => V1 a -> a #

signorm :: Floating a => V1 a -> V1 a #

Additive V1 

Methods

zero :: Num a => V1 a #

(^+^) :: Num a => V1 a -> V1 a -> V1 a #

(^-^) :: Num a => V1 a -> V1 a -> V1 a #

lerp :: Num a => a -> V1 a -> V1 a -> V1 a #

liftU2 :: (a -> a -> a) -> V1 a -> V1 a -> V1 a #

liftI2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Foldable1 V1 

Methods

fold1 :: Semigroup m => V1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V1 a -> m #

toNonEmpty :: V1 a -> NonEmpty a #

Bind V1 

Methods

(>>-) :: V1 a -> (a -> V1 b) -> V1 b #

join :: V1 (V1 a) -> V1 a #

Unbox a => Vector Vector (V1 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V1 a) -> m (Vector (V1 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V1 a) -> m (Mutable Vector (PrimState m) (V1 a)) #

basicLength :: Vector (V1 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V1 a) -> Vector (V1 a) #

basicUnsafeIndexM :: Monad m => Vector (V1 a) -> Int -> m (V1 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V1 a) -> Vector (V1 a) -> m () #

elemseq :: Vector (V1 a) -> V1 a -> b -> b #

Unbox a => MVector MVector (V1 a) 

Methods

basicLength :: MVector s (V1 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V1 a) -> MVector s (V1 a) #

basicOverlaps :: MVector s (V1 a) -> MVector s (V1 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V1 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V1 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V1 a -> m (MVector (PrimState m) (V1 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> m (V1 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> V1 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V1 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V1 a) -> V1 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V1 a) -> MVector (PrimState m) (V1 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V1 a) -> MVector (PrimState m) (V1 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> m (MVector (PrimState m) (V1 a)) #

Bounded a => Bounded (V1 a) 

Methods

minBound :: V1 a #

maxBound :: V1 a #

Eq a => Eq (V1 a) 

Methods

(==) :: V1 a -> V1 a -> Bool #

(/=) :: V1 a -> V1 a -> Bool #

Floating a => Floating (V1 a) 

Methods

pi :: V1 a #

exp :: V1 a -> V1 a #

log :: V1 a -> V1 a #

sqrt :: V1 a -> V1 a #

(**) :: V1 a -> V1 a -> V1 a #

logBase :: V1 a -> V1 a -> V1 a #

sin :: V1 a -> V1 a #

cos :: V1 a -> V1 a #

tan :: V1 a -> V1 a #

asin :: V1 a -> V1 a #

acos :: V1 a -> V1 a #

atan :: V1 a -> V1 a #

sinh :: V1 a -> V1 a #

cosh :: V1 a -> V1 a #

tanh :: V1 a -> V1 a #

asinh :: V1 a -> V1 a #

acosh :: V1 a -> V1 a #

atanh :: V1 a -> V1 a #

log1p :: V1 a -> V1 a #

expm1 :: V1 a -> V1 a #

log1pexp :: V1 a -> V1 a #

log1mexp :: V1 a -> V1 a #

Fractional a => Fractional (V1 a) 

Methods

(/) :: V1 a -> V1 a -> V1 a #

recip :: V1 a -> V1 a #

fromRational :: Rational -> V1 a #

Data a => Data (V1 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V1 a -> c (V1 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V1 a) #

toConstr :: V1 a -> Constr #

dataTypeOf :: V1 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V1 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V1 a)) #

gmapT :: (forall b. Data b => b -> b) -> V1 a -> V1 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V1 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V1 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V1 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V1 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

Num a => Num (V1 a) 

Methods

(+) :: V1 a -> V1 a -> V1 a #

(-) :: V1 a -> V1 a -> V1 a #

(*) :: V1 a -> V1 a -> V1 a #

negate :: V1 a -> V1 a #

abs :: V1 a -> V1 a #

signum :: V1 a -> V1 a #

fromInteger :: Integer -> V1 a #

Ord a => Ord (V1 a) 

Methods

compare :: V1 a -> V1 a -> Ordering #

(<) :: V1 a -> V1 a -> Bool #

(<=) :: V1 a -> V1 a -> Bool #

(>) :: V1 a -> V1 a -> Bool #

(>=) :: V1 a -> V1 a -> Bool #

max :: V1 a -> V1 a -> V1 a #

min :: V1 a -> V1 a -> V1 a #

Read a => Read (V1 a) 
Show a => Show (V1 a) 

Methods

showsPrec :: Int -> V1 a -> ShowS #

show :: V1 a -> String #

showList :: [V1 a] -> ShowS #

Ix a => Ix (V1 a) 

Methods

range :: (V1 a, V1 a) -> [V1 a] #

index :: (V1 a, V1 a) -> V1 a -> Int #

unsafeIndex :: (V1 a, V1 a) -> V1 a -> Int

inRange :: (V1 a, V1 a) -> V1 a -> Bool #

rangeSize :: (V1 a, V1 a) -> Int #

unsafeRangeSize :: (V1 a, V1 a) -> Int

Generic (V1 a) 

Associated Types

type Rep (V1 a) :: * -> * #

Methods

from :: V1 a -> Rep (V1 a) x #

to :: Rep (V1 a) x -> V1 a #

Storable a => Storable (V1 a) 

Methods

sizeOf :: V1 a -> Int #

alignment :: V1 a -> Int #

peekElemOff :: Ptr (V1 a) -> Int -> IO (V1 a) #

pokeElemOff :: Ptr (V1 a) -> Int -> V1 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V1 a) #

pokeByteOff :: Ptr b -> Int -> V1 a -> IO () #

peek :: Ptr (V1 a) -> IO (V1 a) #

poke :: Ptr (V1 a) -> V1 a -> IO () #

Binary a => Binary (V1 a) 

Methods

put :: V1 a -> Put #

get :: Get (V1 a) #

putList :: [V1 a] -> Put #

Serial a => Serial (V1 a) 

Methods

serialize :: MonadPut m => V1 a -> m () #

deserialize :: MonadGet m => m (V1 a) #

Serialize a => Serialize (V1 a) 

Methods

put :: Putter (V1 a) #

get :: Get (V1 a) #

NFData a => NFData (V1 a) 

Methods

rnf :: V1 a -> () #

Hashable a => Hashable (V1 a) 

Methods

hashWithSalt :: Int -> V1 a -> Int #

hash :: V1 a -> Int #

Unbox a => Unbox (V1 a) 
Ixed (V1 a) 

Methods

ix :: Index (V1 a) -> Traversal' (V1 a) (IxValue (V1 a)) #

Epsilon a => Epsilon (V1 a) 

Methods

nearZero :: V1 a -> Bool #

Num s => FiniteFreeSpace (V1 s) Source # 
(Eq r, Fractional r) => OneDimensional (V1 r) Source # 

Methods

(^/^) :: V1 r -> V1 r -> Maybe (Scalar (V1 r)) Source #

(^/!) :: V1 r -> V1 r -> Scalar (V1 r) Source #

Generic1 * V1 

Associated Types

type Rep1 V1 (f :: V1 -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 V1 f a #

to1 :: Rep1 V1 f a -> f a #

FunctorWithIndex (E V1) V1 

Methods

imap :: (E V1 -> a -> b) -> V1 a -> V1 b #

imapped :: (Indexable (E V1) p, Settable f) => p a (f b) -> V1 a -> f (V1 b) #

FoldableWithIndex (E V1) V1 

Methods

ifoldMap :: Monoid m => (E V1 -> a -> m) -> V1 a -> m #

ifolded :: (Indexable (E V1) p, Contravariant f, Applicative f) => p a (f a) -> V1 a -> f (V1 a) #

ifoldr :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

ifoldr' :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl' :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

TraversableWithIndex (E V1) V1 

Methods

itraverse :: Applicative f => (E V1 -> a -> f b) -> V1 a -> f (V1 b) #

itraversed :: (Indexable (E V1) p, Applicative f) => p a (f b) -> V1 a -> f (V1 b) #

Each (V1 a) (V1 b) a b 

Methods

each :: Traversal (V1 a) (V1 b) a b #

type Rep V1 
type Rep V1 = E V1
type Diff V1 
type Diff V1 = V1
type Size V1 
type Size V1 = 1
data MVector s (V1 a) 
data MVector s (V1 a) = MV_V1 (MVector s a)
type Rep (V1 a) 
type Rep (V1 a) = D1 * (MetaData "V1" "Linear.V1" "linear-1.20.7-89xktLOEAkg6Plva3bgVmn" True) (C1 * (MetaCons "V1" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)))
data (:->:) (E V1) # 
data (:->:) (E V1) = V1T (V1 a)
data Vector (V1 a) 
data Vector (V1 a) = V_V1 (Vector a)
type Index (V1 a) 
type Index (V1 a) = E V1
type IxValue (V1 a) 
type IxValue (V1 a) = a
type Diff (V1 s) # 
type Diff (V1 s) = V1 s
type Basis (V1 s) # 
type Basis (V1 s) = E V1
type Scalar (V1 s) # 
type Scalar (V1 s) = s
type Rep1 * V1 
type Rep1 * V1 = D1 * (MetaData "V1" "Linear.V1" "linear-1.20.7-89xktLOEAkg6Plva3bgVmn" True) (C1 * (MetaCons "V1" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))
type Diff (Point V1 s) # 
type Diff (Point V1 s) = V1 s

data V2 a :: * -> * #

A 2-dimensional vector

>>> pure 1 :: V2 Int
V2 1 1
>>> V2 1 2 + V2 3 4
V2 4 6
>>> V2 1 2 * V2 3 4
V2 3 8
>>> sum (V2 1 2)
3

Instances

Monad V2 

Methods

(>>=) :: V2 a -> (a -> V2 b) -> V2 b #

(>>) :: V2 a -> V2 b -> V2 b #

return :: a -> V2 a #

fail :: String -> V2 a #

Functor V2 

Methods

fmap :: (a -> b) -> V2 a -> V2 b #

(<$) :: a -> V2 b -> V2 a #

MonadFix V2 

Methods

mfix :: (a -> V2 a) -> V2 a #

Applicative V2 

Methods

pure :: a -> V2 a #

(<*>) :: V2 (a -> b) -> V2 a -> V2 b #

liftA2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

(*>) :: V2 a -> V2 b -> V2 b #

(<*) :: V2 a -> V2 b -> V2 a #

Foldable V2 

Methods

fold :: Monoid m => V2 m -> m #

foldMap :: Monoid m => (a -> m) -> V2 a -> m #

foldr :: (a -> b -> b) -> b -> V2 a -> b #

foldr' :: (a -> b -> b) -> b -> V2 a -> b #

foldl :: (b -> a -> b) -> b -> V2 a -> b #

foldl' :: (b -> a -> b) -> b -> V2 a -> b #

foldr1 :: (a -> a -> a) -> V2 a -> a #

foldl1 :: (a -> a -> a) -> V2 a -> a #

toList :: V2 a -> [a] #

null :: V2 a -> Bool #

length :: V2 a -> Int #

elem :: Eq a => a -> V2 a -> Bool #

maximum :: Ord a => V2 a -> a #

minimum :: Ord a => V2 a -> a #

sum :: Num a => V2 a -> a #

product :: Num a => V2 a -> a #

Traversable V2 

Methods

traverse :: Applicative f => (a -> f b) -> V2 a -> f (V2 b) #

sequenceA :: Applicative f => V2 (f a) -> f (V2 a) #

mapM :: Monad m => (a -> m b) -> V2 a -> m (V2 b) #

sequence :: Monad m => V2 (m a) -> m (V2 a) #

Distributive V2 

Methods

distribute :: Functor f => f (V2 a) -> V2 (f a) #

collect :: Functor f => (a -> V2 b) -> f a -> V2 (f b) #

distributeM :: Monad m => m (V2 a) -> V2 (m a) #

collectM :: Monad m => (a -> V2 b) -> m a -> V2 (m b) #

Representable V2 

Associated Types

type Rep (V2 :: * -> *) :: * #

Methods

tabulate :: (Rep V2 -> a) -> V2 a #

index :: V2 a -> Rep V2 -> a #

Eq1 V2 

Methods

liftEq :: (a -> b -> Bool) -> V2 a -> V2 b -> Bool #

Ord1 V2 

Methods

liftCompare :: (a -> b -> Ordering) -> V2 a -> V2 b -> Ordering #

Read1 V2 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V2 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V2 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V2 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V2 a] #

Show1 V2 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V2 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V2 a] -> ShowS #

MonadZip V2 

Methods

mzip :: V2 a -> V2 b -> V2 (a, b) #

mzipWith :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

munzip :: V2 (a, b) -> (V2 a, V2 b) #

Serial1 V2 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V2 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V2 a) #

Apply V2 

Methods

(<.>) :: V2 (a -> b) -> V2 a -> V2 b #

(.>) :: V2 a -> V2 b -> V2 b #

(<.) :: V2 a -> V2 b -> V2 a #

liftF2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

Traversable1 V2 

Methods

traverse1 :: Apply f => (a -> f b) -> V2 a -> f (V2 b) #

sequence1 :: Apply f => V2 (f b) -> f (V2 b) #

Affine V2 

Associated Types

type Diff (V2 :: * -> *) :: * -> * #

Methods

(.-.) :: Num a => V2 a -> V2 a -> Diff V2 a #

(.+^) :: Num a => V2 a -> Diff V2 a -> V2 a #

(.-^) :: Num a => V2 a -> Diff V2 a -> V2 a #

R2 V2 

Methods

_y :: Functor f => (a -> f a) -> V2 a -> f (V2 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V2 a -> f (V2 a) #

R1 V2 

Methods

_x :: Functor f => (a -> f a) -> V2 a -> f (V2 a) #

Finite V2 

Associated Types

type Size (V2 :: * -> *) :: Nat #

Methods

toV :: V2 a -> V Nat (Size V2) a #

fromV :: V Nat (Size V2) a -> V2 a #

Metric V2 

Methods

dot :: Num a => V2 a -> V2 a -> a #

quadrance :: Num a => V2 a -> a #

qd :: Num a => V2 a -> V2 a -> a #

distance :: Floating a => V2 a -> V2 a -> a #

norm :: Floating a => V2 a -> a #

signorm :: Floating a => V2 a -> V2 a #

Additive V2 

Methods

zero :: Num a => V2 a #

(^+^) :: Num a => V2 a -> V2 a -> V2 a #

(^-^) :: Num a => V2 a -> V2 a -> V2 a #

lerp :: Num a => a -> V2 a -> V2 a -> V2 a #

liftU2 :: (a -> a -> a) -> V2 a -> V2 a -> V2 a #

liftI2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

Foldable1 V2 

Methods

fold1 :: Semigroup m => V2 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V2 a -> m #

toNonEmpty :: V2 a -> NonEmpty a #

Bind V2 

Methods

(>>-) :: V2 a -> (a -> V2 b) -> V2 b #

join :: V2 (V2 a) -> V2 a #

Unbox a => Vector Vector (V2 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> m (Vector (V2 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V2 a) -> m (Mutable Vector (PrimState m) (V2 a)) #

basicLength :: Vector (V2 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V2 a) -> Vector (V2 a) #

basicUnsafeIndexM :: Monad m => Vector (V2 a) -> Int -> m (V2 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> Vector (V2 a) -> m () #

elemseq :: Vector (V2 a) -> V2 a -> b -> b #

Unbox a => MVector MVector (V2 a) 

Methods

basicLength :: MVector s (V2 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V2 a) -> MVector s (V2 a) #

basicOverlaps :: MVector s (V2 a) -> MVector s (V2 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V2 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V2 a -> m (MVector (PrimState m) (V2 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (V2 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> V2 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V2 a) -> V2 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (MVector (PrimState m) (V2 a)) #

Bounded a => Bounded (V2 a) 

Methods

minBound :: V2 a #

maxBound :: V2 a #

Eq a => Eq (V2 a) 

Methods

(==) :: V2 a -> V2 a -> Bool #

(/=) :: V2 a -> V2 a -> Bool #

Floating a => Floating (V2 a) 

Methods

pi :: V2 a #

exp :: V2 a -> V2 a #

log :: V2 a -> V2 a #

sqrt :: V2 a -> V2 a #

(**) :: V2 a -> V2 a -> V2 a #

logBase :: V2 a -> V2 a -> V2 a #

sin :: V2 a -> V2 a #

cos :: V2 a -> V2 a #

tan :: V2 a -> V2 a #

asin :: V2 a -> V2 a #

acos :: V2 a -> V2 a #

atan :: V2 a -> V2 a #

sinh :: V2 a -> V2 a #

cosh :: V2 a -> V2 a #

tanh :: V2 a -> V2 a #

asinh :: V2 a -> V2 a #

acosh :: V2 a -> V2 a #

atanh :: V2 a -> V2 a #

log1p :: V2 a -> V2 a #

expm1 :: V2 a -> V2 a #

log1pexp :: V2 a -> V2 a #

log1mexp :: V2 a -> V2 a #

Fractional a => Fractional (V2 a) 

Methods

(/) :: V2 a -> V2 a -> V2 a #

recip :: V2 a -> V2 a #

fromRational :: Rational -> V2 a #

Data a => Data (V2 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V2 a -> c (V2 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V2 a) #

toConstr :: V2 a -> Constr #

dataTypeOf :: V2 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V2 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a)) #

gmapT :: (forall b. Data b => b -> b) -> V2 a -> V2 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V2 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V2 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

Num a => Num (V2 a) 

Methods

(+) :: V2 a -> V2 a -> V2 a #

(-) :: V2 a -> V2 a -> V2 a #

(*) :: V2 a -> V2 a -> V2 a #

negate :: V2 a -> V2 a #

abs :: V2 a -> V2 a #

signum :: V2 a -> V2 a #

fromInteger :: Integer -> V2 a #

Ord a => Ord (V2 a) 

Methods

compare :: V2 a -> V2 a -> Ordering #

(<) :: V2 a -> V2 a -> Bool #

(<=) :: V2 a -> V2 a -> Bool #

(>) :: V2 a -> V2 a -> Bool #

(>=) :: V2 a -> V2 a -> Bool #

max :: V2 a -> V2 a -> V2 a #

min :: V2 a -> V2 a -> V2 a #

Read a => Read (V2 a) 
Show a => Show (V2 a) 

Methods

showsPrec :: Int -> V2 a -> ShowS #

show :: V2 a -> String #

showList :: [V2 a] -> ShowS #

Ix a => Ix (V2 a) 

Methods

range :: (V2 a, V2 a) -> [V2 a] #

index :: (V2 a, V2 a) -> V2 a -> Int #

unsafeIndex :: (V2 a, V2 a) -> V2 a -> Int

inRange :: (V2 a, V2 a) -> V2 a -> Bool #

rangeSize :: (V2 a, V2 a) -> Int #

unsafeRangeSize :: (V2 a, V2 a) -> Int

Generic (V2 a) 

Associated Types

type Rep (V2 a) :: * -> * #

Methods

from :: V2 a -> Rep (V2 a) x #

to :: Rep (V2 a) x -> V2 a #

Storable a => Storable (V2 a) 

Methods

sizeOf :: V2 a -> Int #

alignment :: V2 a -> Int #

peekElemOff :: Ptr (V2 a) -> Int -> IO (V2 a) #

pokeElemOff :: Ptr (V2 a) -> Int -> V2 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V2 a) #

pokeByteOff :: Ptr b -> Int -> V2 a -> IO () #

peek :: Ptr (V2 a) -> IO (V2 a) #

poke :: Ptr (V2 a) -> V2 a -> IO () #

Binary a => Binary (V2 a) 

Methods

put :: V2 a -> Put #

get :: Get (V2 a) #

putList :: [V2 a] -> Put #

Serial a => Serial (V2 a) 

Methods

serialize :: MonadPut m => V2 a -> m () #

deserialize :: MonadGet m => m (V2 a) #

Serialize a => Serialize (V2 a) 

Methods

put :: Putter (V2 a) #

get :: Get (V2 a) #

NFData a => NFData (V2 a) 

Methods

rnf :: V2 a -> () #

Hashable a => Hashable (V2 a) 

Methods

hashWithSalt :: Int -> V2 a -> Int #

hash :: V2 a -> Int #

Unbox a => Unbox (V2 a) 
Ixed (V2 a) 

Methods

ix :: Index (V2 a) -> Traversal' (V2 a) (IxValue (V2 a)) #

Epsilon a => Epsilon (V2 a) 

Methods

nearZero :: V2 a -> Bool #

Num s => FiniteFreeSpace (V2 s) Source # 
Generic1 * V2 

Associated Types

type Rep1 V2 (f :: V2 -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 V2 f a #

to1 :: Rep1 V2 f a -> f a #

FunctorWithIndex (E V2) V2 

Methods

imap :: (E V2 -> a -> b) -> V2 a -> V2 b #

imapped :: (Indexable (E V2) p, Settable f) => p a (f b) -> V2 a -> f (V2 b) #

FoldableWithIndex (E V2) V2 

Methods

ifoldMap :: Monoid m => (E V2 -> a -> m) -> V2 a -> m #

ifolded :: (Indexable (E V2) p, Contravariant f, Applicative f) => p a (f a) -> V2 a -> f (V2 a) #

ifoldr :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

ifoldr' :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl' :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

TraversableWithIndex (E V2) V2 

Methods

itraverse :: Applicative f => (E V2 -> a -> f b) -> V2 a -> f (V2 b) #

itraversed :: (Indexable (E V2) p, Applicative f) => p a (f b) -> V2 a -> f (V2 b) #

Each (V2 a) (V2 b) a b 

Methods

each :: Traversal (V2 a) (V2 b) a b #

type Rep V2 
type Rep V2 = E V2
type Diff V2 
type Diff V2 = V2
type Size V2 
type Size V2 = 2
data MVector s (V2 a) 
data MVector s (V2 a) = MV_V2 !Int !(MVector s a)
type Rep (V2 a) 
type Rep (V2 a) = D1 * (MetaData "V2" "Linear.V2" "linear-1.20.7-89xktLOEAkg6Plva3bgVmn" False) (C1 * (MetaCons "V2" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * a)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * a))))
data (:->:) (E V2) # 
data (:->:) (E V2) = V2T (V2 a)
data Vector (V2 a) 
data Vector (V2 a) = V_V2 !Int !(Vector a)
type Index (V2 a) 
type Index (V2 a) = E V2
type IxValue (V2 a) 
type IxValue (V2 a) = a
type Diff (V2 s) # 
type Diff (V2 s) = V2 s
type Basis (V2 s) # 
type Basis (V2 s) = E V2
type Scalar (V2 s) # 
type Scalar (V2 s) = s
type Rep1 * V2 
type Diff (Point V2 s) # 
type Diff (Point V2 s) = V2 s

data V3 a :: * -> * #

A 3-dimensional vector

Instances

Monad V3 

Methods

(>>=) :: V3 a -> (a -> V3 b) -> V3 b #

(>>) :: V3 a -> V3 b -> V3 b #

return :: a -> V3 a #

fail :: String -> V3 a #

Functor V3 

Methods

fmap :: (a -> b) -> V3 a -> V3 b #

(<$) :: a -> V3 b -> V3 a #

MonadFix V3 

Methods

mfix :: (a -> V3 a) -> V3 a #

Applicative V3 

Methods

pure :: a -> V3 a #

(<*>) :: V3 (a -> b) -> V3 a -> V3 b #

liftA2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

(*>) :: V3 a -> V3 b -> V3 b #

(<*) :: V3 a -> V3 b -> V3 a #

Foldable V3 

Methods

fold :: Monoid m => V3 m -> m #

foldMap :: Monoid m => (a -> m) -> V3 a -> m #

foldr :: (a -> b -> b) -> b -> V3 a -> b #

foldr' :: (a -> b -> b) -> b -> V3 a -> b #

foldl :: (b -> a -> b) -> b -> V3 a -> b #

foldl' :: (b -> a -> b) -> b -> V3 a -> b #

foldr1 :: (a -> a -> a) -> V3 a -> a #

foldl1 :: (a -> a -> a) -> V3 a -> a #

toList :: V3 a -> [a] #

null :: V3 a -> Bool #

length :: V3 a -> Int #

elem :: Eq a => a -> V3 a -> Bool #

maximum :: Ord a => V3 a -> a #

minimum :: Ord a => V3 a -> a #

sum :: Num a => V3 a -> a #

product :: Num a => V3 a -> a #

Traversable V3 

Methods

traverse :: Applicative f => (a -> f b) -> V3 a -> f (V3 b) #

sequenceA :: Applicative f => V3 (f a) -> f (V3 a) #

mapM :: Monad m => (a -> m b) -> V3 a -> m (V3 b) #

sequence :: Monad m => V3 (m a) -> m (V3 a) #

Distributive V3 

Methods

distribute :: Functor f => f (V3 a) -> V3 (f a) #

collect :: Functor f => (a -> V3 b) -> f a -> V3 (f b) #

distributeM :: Monad m => m (V3 a) -> V3 (m a) #

collectM :: Monad m => (a -> V3 b) -> m a -> V3 (m b) #

Representable V3 

Associated Types

type Rep (V3 :: * -> *) :: * #

Methods

tabulate :: (Rep V3 -> a) -> V3 a #

index :: V3 a -> Rep V3 -> a #

Eq1 V3 

Methods

liftEq :: (a -> b -> Bool) -> V3 a -> V3 b -> Bool #

Ord1 V3 

Methods

liftCompare :: (a -> b -> Ordering) -> V3 a -> V3 b -> Ordering #

Read1 V3 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V3 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V3 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V3 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V3 a] #

Show1 V3 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V3 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V3 a] -> ShowS #

MonadZip V3 

Methods

mzip :: V3 a -> V3 b -> V3 (a, b) #

mzipWith :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

munzip :: V3 (a, b) -> (V3 a, V3 b) #

Serial1 V3 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V3 a) #

Apply V3 

Methods

(<.>) :: V3 (a -> b) -> V3 a -> V3 b #

(.>) :: V3 a -> V3 b -> V3 b #

(<.) :: V3 a -> V3 b -> V3 a #

liftF2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Traversable1 V3 

Methods

traverse1 :: Apply f => (a -> f b) -> V3 a -> f (V3 b) #

sequence1 :: Apply f => V3 (f b) -> f (V3 b) #

Affine V3 

Associated Types

type Diff (V3 :: * -> *) :: * -> * #

Methods

(.-.) :: Num a => V3 a -> V3 a -> Diff V3 a #

(.+^) :: Num a => V3 a -> Diff V3 a -> V3 a #

(.-^) :: Num a => V3 a -> Diff V3 a -> V3 a #

R3 V3 

Methods

_z :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V3 a -> f (V3 a) #

R2 V3 

Methods

_y :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V3 a -> f (V3 a) #

R1 V3 

Methods

_x :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

Finite V3 

Associated Types

type Size (V3 :: * -> *) :: Nat #

Methods

toV :: V3 a -> V Nat (Size V3) a #

fromV :: V Nat (Size V3) a -> V3 a #

Metric V3 

Methods

dot :: Num a => V3 a -> V3 a -> a #

quadrance :: Num a => V3 a -> a #

qd :: Num a => V3 a -> V3 a -> a #

distance :: Floating a => V3 a -> V3 a -> a #

norm :: Floating a => V3 a -> a #

signorm :: Floating a => V3 a -> V3 a #

Additive V3 

Methods

zero :: Num a => V3 a #

(^+^) :: Num a => V3 a -> V3 a -> V3 a #

(^-^) :: Num a => V3 a -> V3 a -> V3 a #

lerp :: Num a => a -> V3 a -> V3 a -> V3 a #

liftU2 :: (a -> a -> a) -> V3 a -> V3 a -> V3 a #

liftI2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Foldable1 V3 

Methods

fold1 :: Semigroup m => V3 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V3 a -> m #

toNonEmpty :: V3 a -> NonEmpty a #

Bind V3 

Methods

(>>-) :: V3 a -> (a -> V3 b) -> V3 b #

join :: V3 (V3 a) -> V3 a #

Unbox a => Vector Vector (V3 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> m (Vector (V3 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V3 a) -> m (Mutable Vector (PrimState m) (V3 a)) #

basicLength :: Vector (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) #

basicUnsafeIndexM :: Monad m => Vector (V3 a) -> Int -> m (V3 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> Vector (V3 a) -> m () #

elemseq :: Vector (V3 a) -> V3 a -> b -> b #

Unbox a => MVector MVector (V3 a) 

Methods

basicLength :: MVector s (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) #

basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V3 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V3 a -> m (MVector (PrimState m) (V3 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (V3 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> V3 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V3 a) -> V3 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (MVector (PrimState m) (V3 a)) #

Bounded a => Bounded (V3 a) 

Methods

minBound :: V3 a #

maxBound :: V3 a #

Eq a => Eq (V3 a) 

Methods

(==) :: V3 a -> V3 a -> Bool #

(/=) :: V3 a -> V3 a -> Bool #

Floating a => Floating (V3 a) 

Methods

pi :: V3 a #

exp :: V3 a -> V3 a #

log :: V3 a -> V3 a #

sqrt :: V3 a -> V3 a #

(**) :: V3 a -> V3 a -> V3 a #

logBase :: V3 a -> V3 a -> V3 a #

sin :: V3 a -> V3 a #

cos :: V3 a -> V3 a #

tan :: V3 a -> V3 a #

asin :: V3 a -> V3 a #

acos :: V3 a -> V3 a #

atan :: V3 a -> V3 a #

sinh :: V3 a -> V3 a #

cosh :: V3 a -> V3 a #

tanh :: V3 a -> V3 a #

asinh :: V3 a -> V3 a #

acosh :: V3 a -> V3 a #

atanh :: V3 a -> V3 a #

log1p :: V3 a -> V3 a #

expm1 :: V3 a -> V3 a #

log1pexp :: V3 a -> V3 a #

log1mexp :: V3 a -> V3 a #

Fractional a => Fractional (V3 a) 

Methods

(/) :: V3 a -> V3 a -> V3 a #

recip :: V3 a -> V3 a #

fromRational :: Rational -> V3 a #

Data a => Data (V3 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V3 a -> c (V3 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V3 a) #

toConstr :: V3 a -> Constr #

dataTypeOf :: V3 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V3 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)) #

gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V3 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V3 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

Num a => Num (V3 a) 

Methods

(+) :: V3 a -> V3 a -> V3 a #

(-) :: V3 a -> V3 a -> V3 a #

(*) :: V3 a -> V3 a -> V3 a #

negate :: V3 a -> V3 a #

abs :: V3 a -> V3 a #

signum :: V3 a -> V3 a #

fromInteger :: Integer -> V3 a #

Ord a => Ord (V3 a) 

Methods

compare :: V3 a -> V3 a -> Ordering #

(<) :: V3 a -> V3 a -> Bool #

(<=) :: V3 a -> V3 a -> Bool #

(>) :: V3 a -> V3 a -> Bool #

(>=) :: V3 a -> V3 a -> Bool #

max :: V3 a -> V3 a -> V3 a #

min :: V3 a -> V3 a -> V3 a #

Read a => Read (V3 a) 
Show a => Show (V3 a) 

Methods

showsPrec :: Int -> V3 a -> ShowS #

show :: V3 a -> String #

showList :: [V3 a] -> ShowS #

Ix a => Ix (V3 a) 

Methods

range :: (V3 a, V3 a) -> [V3 a] #

index :: (V3 a, V3 a) -> V3 a -> Int #

unsafeIndex :: (V3 a, V3 a) -> V3 a -> Int

inRange :: (V3 a, V3 a) -> V3 a -> Bool #

rangeSize :: (V3 a, V3 a) -> Int #

unsafeRangeSize :: (V3 a, V3 a) -> Int

Generic (V3 a) 

Associated Types

type Rep (V3 a) :: * -> * #

Methods

from :: V3 a -> Rep (V3 a) x #

to :: Rep (V3 a) x -> V3 a #

Storable a => Storable (V3 a) 

Methods

sizeOf :: V3 a -> Int #

alignment :: V3 a -> Int #

peekElemOff :: Ptr (V3 a) -> Int -> IO (V3 a) #

pokeElemOff :: Ptr (V3 a) -> Int -> V3 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V3 a) #

pokeByteOff :: Ptr b -> Int -> V3 a -> IO () #

peek :: Ptr (V3 a) -> IO (V3 a) #

poke :: Ptr (V3 a) -> V3 a -> IO () #

Binary a => Binary (V3 a) 

Methods

put :: V3 a -> Put #

get :: Get (V3 a) #

putList :: [V3 a] -> Put #

Serial a => Serial (V3 a) 

Methods

serialize :: MonadPut m => V3 a -> m () #

deserialize :: MonadGet m => m (V3 a) #

Serialize a => Serialize (V3 a) 

Methods

put :: Putter (V3 a) #

get :: Get (V3 a) #

NFData a => NFData (V3 a) 

Methods

rnf :: V3 a -> () #

Hashable a => Hashable (V3 a) 

Methods

hashWithSalt :: Int -> V3 a -> Int #

hash :: V3 a -> Int #

Unbox a => Unbox (V3 a) 
Ixed (V3 a) 

Methods

ix :: Index (V3 a) -> Traversal' (V3 a) (IxValue (V3 a)) #

Epsilon a => Epsilon (V3 a) 

Methods

nearZero :: V3 a -> Bool #

Num s => FiniteFreeSpace (V3 s) Source # 
Generic1 * V3 

Associated Types

type Rep1 V3 (f :: V3 -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 V3 f a #

to1 :: Rep1 V3 f a -> f a #

FunctorWithIndex (E V3) V3 

Methods

imap :: (E V3 -> a -> b) -> V3 a -> V3 b #

imapped :: (Indexable (E V3) p, Settable f) => p a (f b) -> V3 a -> f (V3 b) #

FoldableWithIndex (E V3) V3 

Methods

ifoldMap :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifolded :: (Indexable (E V3) p, Contravariant f, Applicative f) => p a (f a) -> V3 a -> f (V3 a) #

ifoldr :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

ifoldr' :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl' :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

TraversableWithIndex (E V3) V3 

Methods

itraverse :: Applicative f => (E V3 -> a -> f b) -> V3 a -> f (V3 b) #

itraversed :: (Indexable (E V3) p, Applicative f) => p a (f b) -> V3 a -> f (V3 b) #

Each (V3 a) (V3 b) a b 

Methods

each :: Traversal (V3 a) (V3 b) a b #

type Rep V3 
type Rep V3 = E V3
type Diff V3 
type Diff V3 = V3
type Size V3 
type Size V3 = 3
data MVector s (V3 a) 
data MVector s (V3 a) = MV_V3 !Int !(MVector s a)
type Rep (V3 a) 
data (:->:) (E V3) # 
data (:->:) (E V3) = V3T (V3 a)
data Vector (V3 a) 
data Vector (V3 a) = V_V3 !Int !(Vector a)
type Index (V3 a) 
type Index (V3 a) = E V3
type IxValue (V3 a) 
type IxValue (V3 a) = a
type Diff (V3 s) # 
type Diff (V3 s) = V3 s
type Basis (V3 s) # 
type Basis (V3 s) = E V3
type Scalar (V3 s) # 
type Scalar (V3 s) = s
type Rep1 * V3 
type Diff (Point V3 s) # 
type Diff (Point V3 s) = V3 s

data V4 a :: * -> * #

A 4-dimensional vector.

Instances

Monad V4 

Methods

(>>=) :: V4 a -> (a -> V4 b) -> V4 b #

(>>) :: V4 a -> V4 b -> V4 b #

return :: a -> V4 a #

fail :: String -> V4 a #

Functor V4 

Methods

fmap :: (a -> b) -> V4 a -> V4 b #

(<$) :: a -> V4 b -> V4 a #

MonadFix V4 

Methods

mfix :: (a -> V4 a) -> V4 a #

Applicative V4 

Methods

pure :: a -> V4 a #

(<*>) :: V4 (a -> b) -> V4 a -> V4 b #

liftA2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

(*>) :: V4 a -> V4 b -> V4 b #

(<*) :: V4 a -> V4 b -> V4 a #

Foldable V4 

Methods

fold :: Monoid m => V4 m -> m #

foldMap :: Monoid m => (a -> m) -> V4 a -> m #

foldr :: (a -> b -> b) -> b -> V4 a -> b #

foldr' :: (a -> b -> b) -> b -> V4 a -> b #

foldl :: (b -> a -> b) -> b -> V4 a -> b #

foldl' :: (b -> a -> b) -> b -> V4 a -> b #

foldr1 :: (a -> a -> a) -> V4 a -> a #

foldl1 :: (a -> a -> a) -> V4 a -> a #

toList :: V4 a -> [a] #

null :: V4 a -> Bool #

length :: V4 a -> Int #

elem :: Eq a => a -> V4 a -> Bool #

maximum :: Ord a => V4 a -> a #

minimum :: Ord a => V4 a -> a #

sum :: Num a => V4 a -> a #

product :: Num a => V4 a -> a #

Traversable V4 

Methods

traverse :: Applicative f => (a -> f b) -> V4 a -> f (V4 b) #

sequenceA :: Applicative f => V4 (f a) -> f (V4 a) #

mapM :: Monad m => (a -> m b) -> V4 a -> m (V4 b) #

sequence :: Monad m => V4 (m a) -> m (V4 a) #

Distributive V4 

Methods

distribute :: Functor f => f (V4 a) -> V4 (f a) #

collect :: Functor f => (a -> V4 b) -> f a -> V4 (f b) #

distributeM :: Monad m => m (V4 a) -> V4 (m a) #

collectM :: Monad m => (a -> V4 b) -> m a -> V4 (m b) #

Representable V4 

Associated Types

type Rep (V4 :: * -> *) :: * #

Methods

tabulate :: (Rep V4 -> a) -> V4 a #

index :: V4 a -> Rep V4 -> a #

Eq1 V4 

Methods

liftEq :: (a -> b -> Bool) -> V4 a -> V4 b -> Bool #

Ord1 V4 

Methods

liftCompare :: (a -> b -> Ordering) -> V4 a -> V4 b -> Ordering #

Read1 V4 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V4 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V4 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V4 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V4 a] #

Show1 V4 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V4 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V4 a] -> ShowS #

MonadZip V4 

Methods

mzip :: V4 a -> V4 b -> V4 (a, b) #

mzipWith :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

munzip :: V4 (a, b) -> (V4 a, V4 b) #

Serial1 V4 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V4 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V4 a) #

Apply V4 

Methods

(<.>) :: V4 (a -> b) -> V4 a -> V4 b #

(.>) :: V4 a -> V4 b -> V4 b #

(<.) :: V4 a -> V4 b -> V4 a #

liftF2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

Traversable1 V4 

Methods

traverse1 :: Apply f => (a -> f b) -> V4 a -> f (V4 b) #

sequence1 :: Apply f => V4 (f b) -> f (V4 b) #

Affine V4 

Associated Types

type Diff (V4 :: * -> *) :: * -> * #

Methods

(.-.) :: Num a => V4 a -> V4 a -> Diff V4 a #

(.+^) :: Num a => V4 a -> Diff V4 a -> V4 a #

(.-^) :: Num a => V4 a -> Diff V4 a -> V4 a #

R4 V4 

Methods

_w :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

_xyzw :: Functor f => (V4 a -> f (V4 a)) -> V4 a -> f (V4 a) #

R3 V4 

Methods

_z :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V4 a -> f (V4 a) #

R2 V4 

Methods

_y :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V4 a -> f (V4 a) #

R1 V4 

Methods

_x :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

Finite V4 

Associated Types

type Size (V4 :: * -> *) :: Nat #

Methods

toV :: V4 a -> V Nat (Size V4) a #

fromV :: V Nat (Size V4) a -> V4 a #

Metric V4 

Methods

dot :: Num a => V4 a -> V4 a -> a #

quadrance :: Num a => V4 a -> a #

qd :: Num a => V4 a -> V4 a -> a #

distance :: Floating a => V4 a -> V4 a -> a #

norm :: Floating a => V4 a -> a #

signorm :: Floating a => V4 a -> V4 a #

Additive V4 

Methods

zero :: Num a => V4 a #

(^+^) :: Num a => V4 a -> V4 a -> V4 a #

(^-^) :: Num a => V4 a -> V4 a -> V4 a #

lerp :: Num a => a -> V4 a -> V4 a -> V4 a #

liftU2 :: (a -> a -> a) -> V4 a -> V4 a -> V4 a #

liftI2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

Foldable1 V4 

Methods

fold1 :: Semigroup m => V4 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V4 a -> m #

toNonEmpty :: V4 a -> NonEmpty a #

Bind V4 

Methods

(>>-) :: V4 a -> (a -> V4 b) -> V4 b #

join :: V4 (V4 a) -> V4 a #

Unbox a => Vector Vector (V4 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> m (Vector (V4 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V4 a) -> m (Mutable Vector (PrimState m) (V4 a)) #

basicLength :: Vector (V4 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V4 a) -> Vector (V4 a) #

basicUnsafeIndexM :: Monad m => Vector (V4 a) -> Int -> m (V4 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> Vector (V4 a) -> m () #

elemseq :: Vector (V4 a) -> V4 a -> b -> b #

Unbox a => MVector MVector (V4 a) 

Methods

basicLength :: MVector s (V4 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V4 a) -> MVector s (V4 a) #

basicOverlaps :: MVector s (V4 a) -> MVector s (V4 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V4 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V4 a -> m (MVector (PrimState m) (V4 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (V4 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> V4 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V4 a) -> V4 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (MVector (PrimState m) (V4 a)) #

Bounded a => Bounded (V4 a) 

Methods

minBound :: V4 a #

maxBound :: V4 a #

Eq a => Eq (V4 a) 

Methods

(==) :: V4 a -> V4 a -> Bool #

(/=) :: V4 a -> V4 a -> Bool #

Floating a => Floating (V4 a) 

Methods

pi :: V4 a #

exp :: V4 a -> V4 a #

log :: V4 a -> V4 a #

sqrt :: V4 a -> V4 a #

(**) :: V4 a -> V4 a -> V4 a #

logBase :: V4 a -> V4 a -> V4 a #

sin :: V4 a -> V4 a #

cos :: V4 a -> V4 a #

tan :: V4 a -> V4 a #

asin :: V4 a -> V4 a #

acos :: V4 a -> V4 a #

atan :: V4 a -> V4 a #

sinh :: V4 a -> V4 a #

cosh :: V4 a -> V4 a #

tanh :: V4 a -> V4 a #

asinh :: V4 a -> V4 a #

acosh :: V4 a -> V4 a #

atanh :: V4 a -> V4 a #

log1p :: V4 a -> V4 a #

expm1 :: V4 a -> V4 a #

log1pexp :: V4 a -> V4 a #

log1mexp :: V4 a -> V4 a #

Fractional a => Fractional (V4 a) 

Methods

(/) :: V4 a -> V4 a -> V4 a #

recip :: V4 a -> V4 a #

fromRational :: Rational -> V4 a #

Data a => Data (V4 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V4 a -> c (V4 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V4 a) #

toConstr :: V4 a -> Constr #

dataTypeOf :: V4 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V4 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a)) #

gmapT :: (forall b. Data b => b -> b) -> V4 a -> V4 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V4 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V4 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

Num a => Num (V4 a) 

Methods

(+) :: V4 a -> V4 a -> V4 a #

(-) :: V4 a -> V4 a -> V4 a #

(*) :: V4 a -> V4 a -> V4 a #

negate :: V4 a -> V4 a #

abs :: V4 a -> V4 a #

signum :: V4 a -> V4 a #

fromInteger :: Integer -> V4 a #

Ord a => Ord (V4 a) 

Methods

compare :: V4 a -> V4 a -> Ordering #

(<) :: V4 a -> V4 a -> Bool #

(<=) :: V4 a -> V4 a -> Bool #

(>) :: V4 a -> V4 a -> Bool #

(>=) :: V4 a -> V4 a -> Bool #

max :: V4 a -> V4 a -> V4 a #

min :: V4 a -> V4 a -> V4 a #

Read a => Read (V4 a) 
Show a => Show (V4 a) 

Methods

showsPrec :: Int -> V4 a -> ShowS #

show :: V4 a -> String #

showList :: [V4 a] -> ShowS #

Ix a => Ix (V4 a) 

Methods

range :: (V4 a, V4 a) -> [V4 a] #

index :: (V4 a, V4 a) -> V4 a -> Int #

unsafeIndex :: (V4 a, V4 a) -> V4 a -> Int

inRange :: (V4 a, V4 a) -> V4 a -> Bool #

rangeSize :: (V4 a, V4 a) -> Int #

unsafeRangeSize :: (V4 a, V4 a) -> Int

Generic (V4 a) 

Associated Types

type Rep (V4 a) :: * -> * #

Methods

from :: V4 a -> Rep (V4 a) x #

to :: Rep (V4 a) x -> V4 a #

Storable a => Storable (V4 a) 

Methods

sizeOf :: V4 a -> Int #

alignment :: V4 a -> Int #

peekElemOff :: Ptr (V4 a) -> Int -> IO (V4 a) #

pokeElemOff :: Ptr (V4 a) -> Int -> V4 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V4 a) #

pokeByteOff :: Ptr b -> Int -> V4 a -> IO () #

peek :: Ptr (V4 a) -> IO (V4 a) #

poke :: Ptr (V4 a) -> V4 a -> IO () #

Binary a => Binary (V4 a) 

Methods

put :: V4 a -> Put #

get :: Get (V4 a) #

putList :: [V4 a] -> Put #

Serial a => Serial (V4 a) 

Methods

serialize :: MonadPut m => V4 a -> m () #

deserialize :: MonadGet m => m (V4 a) #

Serialize a => Serialize (V4 a) 

Methods

put :: Putter (V4 a) #

get :: Get (V4 a) #

NFData a => NFData (V4 a) 

Methods

rnf :: V4 a -> () #

Hashable a => Hashable (V4 a) 

Methods

hashWithSalt :: Int -> V4 a -> Int #

hash :: V4 a -> Int #

Unbox a => Unbox (V4 a) 
Ixed (V4 a) 

Methods

ix :: Index (V4 a) -> Traversal' (V4 a) (IxValue (V4 a)) #

Epsilon a => Epsilon (V4 a) 

Methods

nearZero :: V4 a -> Bool #

Num s => FiniteFreeSpace (V4 s) Source # 
Generic1 * V4 

Associated Types

type Rep1 V4 (f :: V4 -> *) :: k -> * #

Methods

from1 :: f a -> Rep1 V4 f a #

to1 :: Rep1 V4 f a -> f a #

FunctorWithIndex (E V4) V4 

Methods

imap :: (E V4 -> a -> b) -> V4 a -> V4 b #

imapped :: (Indexable (E V4) p, Settable f) => p a (f b) -> V4 a -> f (V4 b) #

FoldableWithIndex (E V4) V4 

Methods

ifoldMap :: Monoid m => (E V4 -> a -> m) -> V4 a -> m #

ifolded :: (Indexable (E V4) p, Contravariant f, Applicative f) => p a (f a) -> V4 a -> f (V4 a) #

ifoldr :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

ifoldr' :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl' :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

TraversableWithIndex (E V4) V4 

Methods

itraverse :: Applicative f => (E V4 -> a -> f b) -> V4 a -> f (V4 b) #

itraversed :: (Indexable (E V4) p, Applicative f) => p a (f b) -> V4 a -> f (V4 b) #

Each (V4 a) (V4 b) a b 

Methods

each :: Traversal (V4 a) (V4 b) a b #

type Rep V4 
type Rep V4 = E V4
type Diff V4 
type Diff V4 = V4
type Size V4 
type Size V4 = 4
data MVector s (V4 a) 
data MVector s (V4 a) = MV_V4 !Int !(MVector s a)
type Rep (V4 a) 
data (:->:) (E V4) # 
data (:->:) (E V4) = V4T (V4 a)
data Vector (V4 a) 
data Vector (V4 a) = V_V4 !Int !(Vector a)
type Index (V4 a) 
type Index (V4 a) = E V4
type IxValue (V4 a) 
type IxValue (V4 a) = a
type Diff (V4 s) # 
type Diff (V4 s) = V4 s
type Basis (V4 s) # 
type Basis (V4 s) = E V4
type Scalar (V4 s) # 
type Scalar (V4 s) = s
type Rep1 * V4 
type Diff (Point V4 s) # 
type Diff (Point V4 s) = V4 s

Arbitrary dimension

data FinSuppSeq n Source #

The space of finitely-supported sequences is an infinite-dimensional space. An vector of length l is here understood as an infinite sequence that begins with l nonzero values, and continues with infinite zeroes.

You may also consider this as the type that languages like Octave/Matlab (as well as Haskell's hmatrix library) approximate with their “vectors”, with one important difference: there is no such thing as a dimensional-mismatch error, since we consider all these vectors as elements of the same infinite-dimensional space. Adding two different-size vectors will simply zero-pad the shorter, and unlike in Matlab this behaviour extends consequently to matrix multiplication etc. (defined in linearmap-category)

Of course it can make sense to constrain the dimension, but for this the type system should be used, not runtime checks.

(This is the same behaviour that the linear library gives to the standard list and vector types, but the problem there is that it can't use unboxed arrays as these are not functors, but unboxing is crucial for performance.)

Instances

Unbox n => IsList (FinSuppSeq n) Source # 

Associated Types

type Item (FinSuppSeq n) :: * #

(Unbox n, Show n) => Show (FinSuppSeq n) Source # 
(Num n, Unbox n) => AffineSpace (FinSuppSeq n) Source # 

Associated Types

type Diff (FinSuppSeq n) :: * #

(Num n, Unbox n) => HasBasis (FinSuppSeq n) Source # 

Associated Types

type Basis (FinSuppSeq n) :: * #

(Num n, Unbox n) => VectorSpace (FinSuppSeq n) Source # 

Associated Types

type Scalar (FinSuppSeq n) :: * #

Methods

(*^) :: Scalar (FinSuppSeq n) -> FinSuppSeq n -> FinSuppSeq n #

(Num n, AdditiveGroup n, Unbox n) => InnerSpace (FinSuppSeq n) Source # 

Methods

(<.>) :: FinSuppSeq n -> FinSuppSeq n -> Scalar (FinSuppSeq n) #

(Num n, Unbox n) => AdditiveGroup (FinSuppSeq n) Source # 
(Num n, AdditiveGroup n, Unbox n) => FreeVectorSpace (FinSuppSeq n) Source # 
type Item (FinSuppSeq n) Source # 
type Item (FinSuppSeq n) = n
type Diff (FinSuppSeq n) Source # 
type Basis (FinSuppSeq n) Source # 
type Basis (FinSuppSeq n) = Int
type Scalar (FinSuppSeq n) Source # 
type Scalar (FinSuppSeq n) = n

The vector-space type classes

General

These come from the vector-space package.

class AdditiveGroup (Diff p) => AffineSpace p where #

Associated Types

type Diff p :: * #

Associated vector space

Methods

(.-.) :: p -> p -> Diff p infix 6 #

Subtract points

(.+^) :: p -> Diff p -> p infixl 6 #

Point plus vector

Instances

AffineSpace Double 

Associated Types

type Diff Double :: * #

AffineSpace Float 

Associated Types

type Diff Float :: * #

Methods

(.-.) :: Float -> Float -> Diff Float #

(.+^) :: Float -> Diff Float -> Float #

AffineSpace Int 

Associated Types

type Diff Int :: * #

Methods

(.-.) :: Int -> Int -> Diff Int #

(.+^) :: Int -> Diff Int -> Int #

AffineSpace Integer 

Associated Types

type Diff Integer :: * #

AffineSpace CSChar 

Associated Types

type Diff CSChar :: * #

AffineSpace CShort 

Associated Types

type Diff CShort :: * #

AffineSpace CInt 

Associated Types

type Diff CInt :: * #

Methods

(.-.) :: CInt -> CInt -> Diff CInt #

(.+^) :: CInt -> Diff CInt -> CInt #

AffineSpace CLong 

Associated Types

type Diff CLong :: * #

Methods

(.-.) :: CLong -> CLong -> Diff CLong #

(.+^) :: CLong -> Diff CLong -> CLong #

AffineSpace CLLong 

Associated Types

type Diff CLLong :: * #

AffineSpace CFloat 

Associated Types

type Diff CFloat :: * #

AffineSpace CDouble 

Associated Types

type Diff CDouble :: * #

AffineSpace CIntMax 

Associated Types

type Diff CIntMax :: * #

Integral a => AffineSpace (Ratio a) 

Associated Types

type Diff (Ratio a) :: * #

Methods

(.-.) :: Ratio a -> Ratio a -> Diff (Ratio a) #

(.+^) :: Ratio a -> Diff (Ratio a) -> Ratio a #

(Num n, Unbox n) => AffineSpace (SemisparseSuppSeq n) # 
(Num n, Unbox n) => AffineSpace (SparseSuppSeq n) # 

Associated Types

type Diff (SparseSuppSeq n) :: * #

(Num n, Unbox n) => AffineSpace (FinSuppSeq n) # 

Associated Types

type Diff (FinSuppSeq n) :: * #

(Num n, Unbox n) => AffineSpace (Sequence n) # 

Associated Types

type Diff (Sequence n) :: * #

Methods

(.-.) :: Sequence n -> Sequence n -> Diff (Sequence n) #

(.+^) :: Sequence n -> Diff (Sequence n) -> Sequence n #

AffineSpace p => AffineSpace (a -> p) 

Associated Types

type Diff (a -> p) :: * #

Methods

(.-.) :: (a -> p) -> (a -> p) -> Diff (a -> p) #

(.+^) :: (a -> p) -> Diff (a -> p) -> a -> p #

(AffineSpace p, AffineSpace q) => AffineSpace (p, q) 

Associated Types

type Diff (p, q) :: * #

Methods

(.-.) :: (p, q) -> (p, q) -> Diff (p, q) #

(.+^) :: (p, q) -> Diff (p, q) -> (p, q) #

AffineSpace a => AffineSpace (Rec0 * a s) 

Associated Types

type Diff (Rec0 * a s) :: * #

Methods

(.-.) :: Rec0 * a s -> Rec0 * a s -> Diff (Rec0 * a s) #

(.+^) :: Rec0 * a s -> Diff (Rec0 * a s) -> Rec0 * a s #

(AffineSpace p, AffineSpace q, AffineSpace r) => AffineSpace (p, q, r) 

Associated Types

type Diff (p, q, r) :: * #

Methods

(.-.) :: (p, q, r) -> (p, q, r) -> Diff (p, q, r) #

(.+^) :: (p, q, r) -> Diff (p, q, r) -> (p, q, r) #

(AffineSpace (f p), AffineSpace (g p)) => AffineSpace (AffineDiffProductSpace f g p) 

Associated Types

type Diff (AffineDiffProductSpace f g p) :: * #

Methods

(.-.) :: AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p -> Diff (AffineDiffProductSpace f g p) #

(.+^) :: AffineDiffProductSpace f g p -> Diff (AffineDiffProductSpace f g p) -> AffineDiffProductSpace f g p #

(AffineSpace (f p), AffineSpace (g p)) => AffineSpace ((:*:) * f g p) 

Associated Types

type Diff ((* :*: f) g p) :: * #

Methods

(.-.) :: (* :*: f) g p -> (* :*: f) g p -> Diff ((* :*: f) g p) #

(.+^) :: (* :*: f) g p -> Diff ((* :*: f) g p) -> (* :*: f) g p #

AffineSpace (f p) => AffineSpace (M1 * i c f p) 

Associated Types

type Diff (M1 * i c f p) :: * #

Methods

(.-.) :: M1 * i c f p -> M1 * i c f p -> Diff (M1 * i c f p) #

(.+^) :: M1 * i c f p -> Diff (M1 * i c f p) -> M1 * i c f p #

class AdditiveGroup v where #

Additive group v.

Methods

zeroV :: v #

The zero element: identity for '(^+^)'

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

Add vectors

negateV :: v -> v #

Additive inverse

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

Group subtraction

Instances

AdditiveGroup Double 
AdditiveGroup Float 
AdditiveGroup Int 

Methods

zeroV :: Int #

(^+^) :: Int -> Int -> Int #

negateV :: Int -> Int #

(^-^) :: Int -> Int -> Int #

AdditiveGroup Integer 
AdditiveGroup () 

Methods

zeroV :: () #

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

negateV :: () -> () #

(^-^) :: () -> () -> () #

AdditiveGroup CSChar 
AdditiveGroup CShort 
AdditiveGroup CInt 

Methods

zeroV :: CInt #

(^+^) :: CInt -> CInt -> CInt #

negateV :: CInt -> CInt #

(^-^) :: CInt -> CInt -> CInt #

AdditiveGroup CLong 
AdditiveGroup CLLong 
AdditiveGroup CFloat 
AdditiveGroup CDouble 
AdditiveGroup CIntMax 
AdditiveGroup a => AdditiveGroup (Maybe a) 

Methods

zeroV :: Maybe a #

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

negateV :: Maybe a -> Maybe a #

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

Integral a => AdditiveGroup (Ratio a) 

Methods

zeroV :: Ratio a #

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

negateV :: Ratio a -> Ratio a #

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

(RealFloat v, AdditiveGroup v) => AdditiveGroup (Complex v) 

Methods

zeroV :: Complex v #

(^+^) :: Complex v -> Complex v -> Complex v #

negateV :: Complex v -> Complex v #

(^-^) :: Complex v -> Complex v -> Complex v #

AdditiveGroup (Diff (VRep p)) => AdditiveGroup (GenericDiff p) 

Methods

zeroV :: GenericDiff p #

(^+^) :: GenericDiff p -> GenericDiff p -> GenericDiff p #

negateV :: GenericDiff p -> GenericDiff p #

(^-^) :: GenericDiff p -> GenericDiff p -> GenericDiff p #

AdditiveGroup a => AdditiveGroup (Sum a) 

Methods

zeroV :: Sum a #

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

negateV :: Sum a -> Sum a #

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

(Num n, Unbox n) => AdditiveGroup (SemisparseSuppSeq n) # 
(Num n, Unbox n) => AdditiveGroup (SparseSuppSeq n) # 
(Num n, Unbox n) => AdditiveGroup (FinSuppSeq n) # 
(Num n, Unbox n) => AdditiveGroup (Sequence n) # 
AdditiveGroup v => AdditiveGroup (a -> v) 

Methods

zeroV :: a -> v #

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

negateV :: (a -> v) -> a -> v #

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

(AdditiveGroup u, AdditiveGroup v) => AdditiveGroup (u, v) 

Methods

zeroV :: (u, v) #

(^+^) :: (u, v) -> (u, v) -> (u, v) #

negateV :: (u, v) -> (u, v) #

(^-^) :: (u, v) -> (u, v) -> (u, v) #

(HasTrie u, AdditiveGroup v) => AdditiveGroup ((:->:) u v) 

Methods

zeroV :: u :->: v #

(^+^) :: (u :->: v) -> (u :->: v) -> u :->: v #

negateV :: (u :->: v) -> u :->: v #

(^-^) :: (u :->: v) -> (u :->: v) -> u :->: v #

(HasBasis a, HasTrie (Basis a), AdditiveGroup u) => AdditiveGroup ((:>) a u) 

Methods

zeroV :: a :> u #

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

negateV :: (a :> u) -> a :> u #

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

(HasTrie (Basis u), AdditiveGroup v) => AdditiveGroup ((:-*) u v) 

Methods

zeroV :: u :-* v #

(^+^) :: (u :-* v) -> (u :-* v) -> u :-* v #

negateV :: (u :-* v) -> u :-* v #

(^-^) :: (u :-* v) -> (u :-* v) -> u :-* v #

AdditiveGroup a => AdditiveGroup (Rec0 * a s) 

Methods

zeroV :: Rec0 * a s #

(^+^) :: Rec0 * a s -> Rec0 * a s -> Rec0 * a s #

negateV :: Rec0 * a s -> Rec0 * a s #

(^-^) :: Rec0 * a s -> Rec0 * a s -> Rec0 * a s #

(AdditiveGroup u, AdditiveGroup v, AdditiveGroup w) => AdditiveGroup (u, v, w) 

Methods

zeroV :: (u, v, w) #

(^+^) :: (u, v, w) -> (u, v, w) -> (u, v, w) #

negateV :: (u, v, w) -> (u, v, w) #

(^-^) :: (u, v, w) -> (u, v, w) -> (u, v, w) #

(AffineSpace (f p), AffineSpace (g p)) => AdditiveGroup (AffineDiffProductSpace f g p) 

Methods

zeroV :: AffineDiffProductSpace f g p #

(^+^) :: AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p #

negateV :: AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p #

(^-^) :: AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p #

(AdditiveGroup (f p), AdditiveGroup (g p)) => AdditiveGroup ((:*:) * f g p) 

Methods

zeroV :: (* :*: f) g p #

(^+^) :: (* :*: f) g p -> (* :*: f) g p -> (* :*: f) g p #

negateV :: (* :*: f) g p -> (* :*: f) g p #

(^-^) :: (* :*: f) g p -> (* :*: f) g p -> (* :*: f) g p #

(AdditiveGroup u, AdditiveGroup v, AdditiveGroup w, AdditiveGroup x) => AdditiveGroup (u, v, w, x) 

Methods

zeroV :: (u, v, w, x) #

(^+^) :: (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) #

negateV :: (u, v, w, x) -> (u, v, w, x) #

(^-^) :: (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) #

AdditiveGroup (f p) => AdditiveGroup (M1 * i c f p) 

Methods

zeroV :: M1 * i c f p #

(^+^) :: M1 * i c f p -> M1 * i c f p -> M1 * i c f p #

negateV :: M1 * i c f p -> M1 * i c f p #

(^-^) :: M1 * i c f p -> M1 * i c f p -> M1 * i c f p #

class AdditiveGroup v => VectorSpace v where #

Vector space v.

Associated Types

type Scalar v :: * #

Methods

(*^) :: Scalar v -> v -> v infixr 7 #

Scale a vector

Instances

VectorSpace Double 

Associated Types

type Scalar Double :: * #

Methods

(*^) :: Scalar Double -> Double -> Double #

VectorSpace Float 

Associated Types

type Scalar Float :: * #

Methods

(*^) :: Scalar Float -> Float -> Float #

VectorSpace Int 

Associated Types

type Scalar Int :: * #

Methods

(*^) :: Scalar Int -> Int -> Int #

VectorSpace Integer 

Associated Types

type Scalar Integer :: * #

VectorSpace CSChar 

Associated Types

type Scalar CSChar :: * #

Methods

(*^) :: Scalar CSChar -> CSChar -> CSChar #

VectorSpace CShort 

Associated Types

type Scalar CShort :: * #

Methods

(*^) :: Scalar CShort -> CShort -> CShort #

VectorSpace CInt 

Associated Types

type Scalar CInt :: * #

Methods

(*^) :: Scalar CInt -> CInt -> CInt #

VectorSpace CLong 

Associated Types

type Scalar CLong :: * #

Methods

(*^) :: Scalar CLong -> CLong -> CLong #

VectorSpace CLLong 

Associated Types

type Scalar CLLong :: * #

Methods

(*^) :: Scalar CLLong -> CLLong -> CLLong #

VectorSpace CFloat 

Associated Types

type Scalar CFloat :: * #

Methods

(*^) :: Scalar CFloat -> CFloat -> CFloat #

VectorSpace CDouble 

Associated Types

type Scalar CDouble :: * #

VectorSpace CIntMax 

Associated Types

type Scalar CIntMax :: * #

VectorSpace v => VectorSpace (Maybe v) 

Associated Types

type Scalar (Maybe v) :: * #

Methods

(*^) :: Scalar (Maybe v) -> Maybe v -> Maybe v #

Integral a => VectorSpace (Ratio a) 

Associated Types

type Scalar (Ratio a) :: * #

Methods

(*^) :: Scalar (Ratio a) -> Ratio a -> Ratio a #

(RealFloat v, VectorSpace v) => VectorSpace (Complex v) 

Associated Types

type Scalar (Complex v) :: * #

Methods

(*^) :: Scalar (Complex v) -> Complex v -> Complex v #

VectorSpace (Diff (VRep p)) => VectorSpace (GenericDiff p) 

Associated Types

type Scalar (GenericDiff p) :: * #

Methods

(*^) :: Scalar (GenericDiff p) -> GenericDiff p -> GenericDiff p #

(Num n, Unbox n) => VectorSpace (SemisparseSuppSeq n) # 

Associated Types

type Scalar (SemisparseSuppSeq n) :: * #

(Num n, Unbox n) => VectorSpace (SparseSuppSeq n) # 

Associated Types

type Scalar (SparseSuppSeq n) :: * #

(Num n, Unbox n) => VectorSpace (FinSuppSeq n) # 

Associated Types

type Scalar (FinSuppSeq n) :: * #

Methods

(*^) :: Scalar (FinSuppSeq n) -> FinSuppSeq n -> FinSuppSeq n #

(Num n, Unbox n) => VectorSpace (Sequence n) # 

Associated Types

type Scalar (Sequence n) :: * #

Methods

(*^) :: Scalar (Sequence n) -> Sequence n -> Sequence n #

VectorSpace v => VectorSpace (a -> v) 

Associated Types

type Scalar (a -> v) :: * #

Methods

(*^) :: Scalar (a -> v) -> (a -> v) -> a -> v #

(VectorSpace u, (~) * s (Scalar u), VectorSpace v, (~) * s (Scalar v)) => VectorSpace (u, v) 

Associated Types

type Scalar (u, v) :: * #

Methods

(*^) :: Scalar (u, v) -> (u, v) -> (u, v) #

(HasTrie a, VectorSpace v) => VectorSpace ((:->:) a v) 

Associated Types

type Scalar (a :->: v) :: * #

Methods

(*^) :: Scalar (a :->: v) -> (a :->: v) -> a :->: v #

(HasBasis a, HasTrie (Basis a), VectorSpace u) => VectorSpace ((:>) a u) 

Associated Types

type Scalar (a :> u) :: * #

Methods

(*^) :: Scalar (a :> u) -> (a :> u) -> a :> u #

(HasTrie (Basis u), VectorSpace v) => VectorSpace ((:-*) u v) 

Associated Types

type Scalar (u :-* v) :: * #

Methods

(*^) :: Scalar (u :-* v) -> (u :-* v) -> u :-* v #

VectorSpace a => VectorSpace (Rec0 * a s) 

Associated Types

type Scalar (Rec0 * a s) :: * #

Methods

(*^) :: Scalar (Rec0 * a s) -> Rec0 * a s -> Rec0 * a s #

(VectorSpace u, (~) * s (Scalar u), VectorSpace v, (~) * s (Scalar v), VectorSpace w, (~) * s (Scalar w)) => VectorSpace (u, v, w) 

Associated Types

type Scalar (u, v, w) :: * #

Methods

(*^) :: Scalar (u, v, w) -> (u, v, w) -> (u, v, w) #

(AffineSpace (f p), AffineSpace (g p), VectorSpace (Diff (f p)), VectorSpace (Diff (g p)), (~) * (Scalar (Diff (f p))) (Scalar (Diff (g p)))) => VectorSpace (AffineDiffProductSpace f g p) 

Associated Types

type Scalar (AffineDiffProductSpace f g p) :: * #

Methods

(*^) :: Scalar (AffineDiffProductSpace f g p) -> AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p #

(VectorSpace (f p), VectorSpace (g p), (~) * (Scalar (f p)) (Scalar (g p))) => VectorSpace ((:*:) * f g p) 

Associated Types

type Scalar ((* :*: f) g p) :: * #

Methods

(*^) :: Scalar ((* :*: f) g p) -> (* :*: f) g p -> (* :*: f) g p #

(VectorSpace u, (~) * s (Scalar u), VectorSpace v, (~) * s (Scalar v), VectorSpace w, (~) * s (Scalar w), VectorSpace x, (~) * s (Scalar x)) => VectorSpace (u, v, w, x) 

Associated Types

type Scalar (u, v, w, x) :: * #

Methods

(*^) :: Scalar (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) #

VectorSpace (f p) => VectorSpace (M1 * i c f p) 

Associated Types

type Scalar (M1 * i c f p) :: * #

Methods

(*^) :: Scalar (M1 * i c f p) -> M1 * i c f p -> M1 * i c f p #

class (VectorSpace v, AdditiveGroup (Scalar v)) => InnerSpace v where #

Adds inner (dot) products.

Methods

(<.>) :: v -> v -> Scalar v infixr 7 #

Inner/dot product

Instances

InnerSpace Double 

Methods

(<.>) :: Double -> Double -> Scalar Double #

InnerSpace Float 

Methods

(<.>) :: Float -> Float -> Scalar Float #

InnerSpace Int 

Methods

(<.>) :: Int -> Int -> Scalar Int #

InnerSpace Integer 
InnerSpace CSChar 

Methods

(<.>) :: CSChar -> CSChar -> Scalar CSChar #

InnerSpace CShort 

Methods

(<.>) :: CShort -> CShort -> Scalar CShort #

InnerSpace CInt 

Methods

(<.>) :: CInt -> CInt -> Scalar CInt #

InnerSpace CLong 

Methods

(<.>) :: CLong -> CLong -> Scalar CLong #

InnerSpace CLLong 

Methods

(<.>) :: CLLong -> CLLong -> Scalar CLLong #

InnerSpace CFloat 

Methods

(<.>) :: CFloat -> CFloat -> Scalar CFloat #

InnerSpace CDouble 
InnerSpace CIntMax 
InnerSpace a => InnerSpace (Maybe a) 

Methods

(<.>) :: Maybe a -> Maybe a -> Scalar (Maybe a) #

Integral a => InnerSpace (Ratio a) 

Methods

(<.>) :: Ratio a -> Ratio a -> Scalar (Ratio a) #

(RealFloat v, InnerSpace v) => InnerSpace (Complex v) 

Methods

(<.>) :: Complex v -> Complex v -> Scalar (Complex v) #

InnerSpace (Diff (VRep p)) => InnerSpace (GenericDiff p) 

Methods

(<.>) :: GenericDiff p -> GenericDiff p -> Scalar (GenericDiff p) #

(Num n, AdditiveGroup n, Unbox n) => InnerSpace (SemisparseSuppSeq n) # 
(Num n, AdditiveGroup n, Unbox n) => InnerSpace (SparseSuppSeq n) # 
(Num n, AdditiveGroup n, Unbox n) => InnerSpace (FinSuppSeq n) # 

Methods

(<.>) :: FinSuppSeq n -> FinSuppSeq n -> Scalar (FinSuppSeq n) #

InnerSpace v => InnerSpace (a -> v) 

Methods

(<.>) :: (a -> v) -> (a -> v) -> Scalar (a -> v) #

(InnerSpace u, (~) * s (Scalar u), InnerSpace v, (~) * s (Scalar v)) => InnerSpace (u, v) 

Methods

(<.>) :: (u, v) -> (u, v) -> Scalar (u, v) #

(InnerSpace u, (~) * s (Scalar u), AdditiveGroup s, HasBasis a, HasTrie (Basis a)) => InnerSpace ((:>) a u) 

Methods

(<.>) :: (a :> u) -> (a :> u) -> Scalar (a :> u) #

InnerSpace a => InnerSpace (Rec0 * a s) 

Methods

(<.>) :: Rec0 * a s -> Rec0 * a s -> Scalar (Rec0 * a s) #

(InnerSpace u, (~) * s (Scalar u), InnerSpace v, (~) * s (Scalar v), InnerSpace w, (~) * s (Scalar w)) => InnerSpace (u, v, w) 

Methods

(<.>) :: (u, v, w) -> (u, v, w) -> Scalar (u, v, w) #

(AffineSpace (f p), AffineSpace (g p), InnerSpace (Diff (f p)), InnerSpace (Diff (g p)), (~) * (Scalar (Diff (f p))) (Scalar (Diff (g p))), Num (Scalar (Diff (f p)))) => InnerSpace (AffineDiffProductSpace f g p) 

Methods

(<.>) :: AffineDiffProductSpace f g p -> AffineDiffProductSpace f g p -> Scalar (AffineDiffProductSpace f g p) #

(InnerSpace (f p), InnerSpace (g p), (~) * (Scalar (f p)) (Scalar (g p)), Num (Scalar (f p))) => InnerSpace ((:*:) * f g p) 

Methods

(<.>) :: (* :*: f) g p -> (* :*: f) g p -> Scalar ((* :*: f) g p) #

(InnerSpace u, (~) * s (Scalar u), InnerSpace v, (~) * s (Scalar v), InnerSpace w, (~) * s (Scalar w), InnerSpace x, (~) * s (Scalar x)) => InnerSpace (u, v, w, x) 

Methods

(<.>) :: (u, v, w, x) -> (u, v, w, x) -> Scalar (u, v, w, x) #

InnerSpace (f p) => InnerSpace (M1 * i c f p) 

Methods

(<.>) :: M1 * i c f p -> M1 * i c f p -> Scalar (M1 * i c f p) #

class VectorSpace v => HasBasis v where #

Associated Types

type Basis v :: * #

Representation of the canonical basis for v

Methods

basisValue :: Basis v -> v #

Interpret basis rep as a vector

decompose :: v -> [(Basis v, Scalar v)] #

Extract coordinates

decompose' :: v -> Basis v -> Scalar v #

Experimental version. More elegant definitions, and friendly to infinite-dimensional vector spaces.

Instances

HasBasis Double 
HasBasis Float 

Associated Types

type Basis Float :: * #

HasBasis CFloat 
HasBasis CDouble 
Integral a => HasBasis (Ratio a) 

Associated Types

type Basis (Ratio a) :: * #

Methods

basisValue :: Basis (Ratio a) -> Ratio a #

decompose :: Ratio a -> [(Basis (Ratio a), Scalar (Ratio a))] #

decompose' :: Ratio a -> Basis (Ratio a) -> Scalar (Ratio a) #

HasBasis (Diff (VRep p)) => HasBasis (GenericDiff p) 

Associated Types

type Basis (GenericDiff p) :: * #

Methods

basisValue :: Basis (GenericDiff p) -> GenericDiff p #

decompose :: GenericDiff p -> [(Basis (GenericDiff p), Scalar (GenericDiff p))] #

decompose' :: GenericDiff p -> Basis (GenericDiff p) -> Scalar (GenericDiff p) #

(Num n, Unbox n) => HasBasis (SemisparseSuppSeq n) # 
(Num n, Unbox n) => HasBasis (SparseSuppSeq n) # 
(Num n, Unbox n) => HasBasis (FinSuppSeq n) # 

Associated Types

type Basis (FinSuppSeq n) :: * #

(Num n, Unbox n) => HasBasis (Sequence n) # 

Associated Types

type Basis (Sequence n) :: * #

(HasBasis u, (~) * s (Scalar u), HasBasis v, (~) * s (Scalar v)) => HasBasis (u, v) 

Associated Types

type Basis (u, v) :: * #

Methods

basisValue :: Basis (u, v) -> (u, v) #

decompose :: (u, v) -> [(Basis (u, v), Scalar (u, v))] #

decompose' :: (u, v) -> Basis (u, v) -> Scalar (u, v) #

HasBasis a => HasBasis (Rec0 * a s) 

Associated Types

type Basis (Rec0 * a s) :: * #

Methods

basisValue :: Basis (Rec0 * a s) -> Rec0 * a s #

decompose :: Rec0 * a s -> [(Basis (Rec0 * a s), Scalar (Rec0 * a s))] #

decompose' :: Rec0 * a s -> Basis (Rec0 * a s) -> Scalar (Rec0 * a s) #

(HasBasis u, (~) * s (Scalar u), HasBasis v, (~) * s (Scalar v), HasBasis w, (~) * s (Scalar w)) => HasBasis (u, v, w) 

Associated Types

type Basis (u, v, w) :: * #

Methods

basisValue :: Basis (u, v, w) -> (u, v, w) #

decompose :: (u, v, w) -> [(Basis (u, v, w), Scalar (u, v, w))] #

decompose' :: (u, v, w) -> Basis (u, v, w) -> Scalar (u, v, w) #

(AffineSpace (f p), AffineSpace (g p), HasBasis (Diff (f p)), HasBasis (Diff (g p)), (~) * (Scalar (Diff (f p))) (Scalar (Diff (g p)))) => HasBasis (AffineDiffProductSpace f g p) 

Associated Types

type Basis (AffineDiffProductSpace f g p) :: * #

Methods

basisValue :: Basis (AffineDiffProductSpace f g p) -> AffineDiffProductSpace f g p #

decompose :: AffineDiffProductSpace f g p -> [(Basis (AffineDiffProductSpace f g p), Scalar (AffineDiffProductSpace f g p))] #

decompose' :: AffineDiffProductSpace f g p -> Basis (AffineDiffProductSpace f g p) -> Scalar (AffineDiffProductSpace f g p) #

(HasBasis (f p), HasBasis (g p), (~) * (Scalar (f p)) (Scalar (g p))) => HasBasis ((:*:) * f g p) 

Associated Types

type Basis ((* :*: f) g p) :: * #

Methods

basisValue :: Basis ((* :*: f) g p) -> (* :*: f) g p #

decompose :: (* :*: f) g p -> [(Basis ((* :*: f) g p), Scalar ((* :*: f) g p))] #

decompose' :: (* :*: f) g p -> Basis ((* :*: f) g p) -> Scalar ((* :*: f) g p) #

HasBasis (f p) => HasBasis (M1 * i c f p) 

Associated Types

type Basis (M1 * i c f p) :: * #

Methods

basisValue :: Basis (M1 * i c f p) -> M1 * i c f p #

decompose :: M1 * i c f p -> [(Basis (M1 * i c f p), Scalar (M1 * i c f p))] #

decompose' :: M1 * i c f p -> Basis (M1 * i c f p) -> Scalar (M1 * i c f p) #

Small

class (VectorSpace v, Fractional (Scalar v)) => OneDimensional v where Source #

Methods

(^/^) :: v -> v -> Maybe (Scalar v) infixr 7 Source #

Compare the (directed) length of two vectors.

(^/^) :: (Generic v, OneDimensional (VRep v), Scalar (VRep v) ~ Scalar v) => v -> v -> Maybe (Scalar v) infixr 7 Source #

Compare the (directed) length of two vectors.

(^/!) :: v -> v -> Scalar v infixr 7 Source #

Unsafe version of ^/^.

Instances

OneDimensional Double Source # 
OneDimensional Float Source # 
OneDimensional CFloat Source # 
OneDimensional CDouble Source # 
Integral i => OneDimensional (Ratio i) Source # 

Methods

(^/^) :: Ratio i -> Ratio i -> Maybe (Scalar (Ratio i)) Source #

(^/!) :: Ratio i -> Ratio i -> Scalar (Ratio i) Source #

(Eq r, Fractional r) => OneDimensional (V1 r) Source # 

Methods

(^/^) :: V1 r -> V1 r -> Maybe (Scalar (V1 r)) Source #

(^/!) :: V1 r -> V1 r -> Scalar (V1 r) Source #

OneDimensional a => OneDimensional (Rec0 * a s) Source # 

Methods

(^/^) :: Rec0 * a s -> Rec0 * a s -> Maybe (Scalar (Rec0 * a s)) Source #

(^/!) :: Rec0 * a s -> Rec0 * a s -> Scalar (Rec0 * a s) Source #

OneDimensional (f p) => OneDimensional (M1 * i c f p) Source # 

Methods

(^/^) :: M1 * i c f p -> M1 * i c f p -> Maybe (Scalar (M1 * i c f p)) Source #

(^/!) :: M1 * i c f p -> M1 * i c f p -> Scalar (M1 * i c f p) Source #

Free

class (VectorSpace v, Num (Scalar v)) => FreeVectorSpace v where Source #

Vector spaces that are spanned by a specific, canonical set of basis vectors.

Minimal complete definition

(^*^), vmap

Methods

(^*^) :: v -> v -> v Source #

Element-wise multiplication, equivalent to Matlab's .* operator or liftI2 (*).

vmap :: (Scalar v -> Scalar v) -> v -> v Source #

Like a monomorphic fmap. Only guaranteed to act on the nonzero entries; whether the function is also applied on zeroes is instance-specific.

Instances

FreeVectorSpace Double Source # 
FreeVectorSpace Float Source # 
FreeVectorSpace Int Source # 

Methods

(^*^) :: Int -> Int -> Int Source #

vmap :: (Scalar Int -> Scalar Int) -> Int -> Int Source #

FreeVectorSpace Integer Source # 
FreeVectorSpace CSChar Source # 
FreeVectorSpace CShort Source # 
FreeVectorSpace CInt Source # 

Methods

(^*^) :: CInt -> CInt -> CInt Source #

vmap :: (Scalar CInt -> Scalar CInt) -> CInt -> CInt Source #

FreeVectorSpace CLong Source # 
FreeVectorSpace CLLong Source # 
FreeVectorSpace CFloat Source # 
FreeVectorSpace CDouble Source # 
FreeVectorSpace CIntMax Source # 
Integral a => FreeVectorSpace (Ratio a) Source # 

Methods

(^*^) :: Ratio a -> Ratio a -> Ratio a Source #

vmap :: (Scalar (Ratio a) -> Scalar (Ratio a)) -> Ratio a -> Ratio a Source #

(Num n, Unbox n) => FreeVectorSpace (SemisparseSuppSeq n) Source # 
(Num n, Unbox n) => FreeVectorSpace (SparseSuppSeq n) Source # 
(Num n, AdditiveGroup n, Unbox n) => FreeVectorSpace (FinSuppSeq n) Source # 
(FreeVectorSpace v, FreeVectorSpace w, (~) * (Scalar v) (Scalar w)) => FreeVectorSpace (v, w) Source # 

Methods

(^*^) :: (v, w) -> (v, w) -> (v, w) Source #

vmap :: (Scalar (v, w) -> Scalar (v, w)) -> (v, w) -> (v, w) Source #

(FreeVectorSpace u, FreeVectorSpace v, FreeVectorSpace w, (~) * (Scalar v) (Scalar u), (~) * (Scalar v) (Scalar w)) => FreeVectorSpace (u, v, w) Source # 

Methods

(^*^) :: (u, v, w) -> (u, v, w) -> (u, v, w) Source #

vmap :: (Scalar (u, v, w) -> Scalar (u, v, w)) -> (u, v, w) -> (u, v, w) Source #

(FreeVectorSpace u, FreeVectorSpace v, FreeVectorSpace w, FreeVectorSpace x, (~) * (Scalar x) (Scalar v), (~) * (Scalar v) (Scalar u), (~) * (Scalar v) (Scalar w)) => FreeVectorSpace (u, v, w, x) Source # 

Methods

(^*^) :: (u, v, w, x) -> (u, v, w, x) -> (u, v, w, x) Source #

vmap :: (Scalar (u, v, w, x) -> Scalar (u, v, w, x)) -> (u, v, w, x) -> (u, v, w, x) Source #

class (VectorSpace v, Num (Scalar v)) => FiniteFreeSpace v where Source #

Instances

FiniteFreeSpace Double Source # 
FiniteFreeSpace Float Source # 
FiniteFreeSpace Int Source # 
Num s => FiniteFreeSpace (V0 s) Source # 
Num s => FiniteFreeSpace (V4 s) Source # 
Num s => FiniteFreeSpace (V3 s) Source # 
Num s => FiniteFreeSpace (V2 s) Source # 
Num s => FiniteFreeSpace (V1 s) Source # 
(FiniteFreeSpace u, FiniteFreeSpace v, (~) * (Scalar u) (Scalar v)) => FiniteFreeSpace (u, v) Source # 

Methods

freeDimension :: Functor p => p (u, v) -> Int Source #

toFullUnboxVect :: (u, v) -> Vector (Scalar (u, v)) Source #

unsafeFromFullUnboxVect :: Vector (Scalar (u, v)) -> (u, v) Source #

fromUnboxVect :: Vector (Scalar (u, v)) -> (u, v) Source #

FiniteFreeSpace a => FiniteFreeSpace (Rec0 * a s) Source # 
(FiniteFreeSpace (f p), FiniteFreeSpace (g p), (~) * (Scalar (f p)) (Scalar (g p))) => FiniteFreeSpace ((:*:) * f g p) Source # 

Methods

freeDimension :: Functor p => p ((* :*: f) g p) -> Int Source #

toFullUnboxVect :: (* :*: f) g p -> Vector (Scalar ((* :*: f) g p)) Source #

unsafeFromFullUnboxVect :: Vector (Scalar ((* :*: f) g p)) -> (* :*: f) g p Source #

fromUnboxVect :: Vector (Scalar ((* :*: f) g p)) -> (* :*: f) g p Source #

FiniteFreeSpace (f p) => FiniteFreeSpace (M1 * i c f p) Source # 

Methods

freeDimension :: Functor p => p (M1 * i c f p) -> Int Source #

toFullUnboxVect :: M1 * i c f p -> Vector (Scalar (M1 * i c f p)) Source #

unsafeFromFullUnboxVect :: Vector (Scalar (M1 * i c f p)) -> M1 * i c f p Source #

fromUnboxVect :: Vector (Scalar (M1 * i c f p)) -> M1 * i c f p Source #

Orphan instances

HasTrie (E V0) Source # 

Associated Types

data (E V0) :->: b :: * #

Methods

trie :: (E V0 -> b) -> E V0 :->: b #

untrie :: (E V0 :->: b) -> E V0 -> b #

enumerate :: (E V0 :->: b) -> [(E V0, b)] #

HasTrie (E V4) Source # 

Associated Types

data (E V4) :->: b :: * #

Methods

trie :: (E V4 -> b) -> E V4 :->: b #

untrie :: (E V4 :->: b) -> E V4 -> b #

enumerate :: (E V4 :->: b) -> [(E V4, b)] #

HasTrie (E V3) Source # 

Associated Types

data (E V3) :->: b :: * #

Methods

trie :: (E V3 -> b) -> E V3 :->: b #

untrie :: (E V3 :->: b) -> E V3 -> b #

enumerate :: (E V3 :->: b) -> [(E V3, b)] #

HasTrie (E V2) Source # 

Associated Types

data (E V2) :->: b :: * #

Methods

trie :: (E V2 -> b) -> E V2 :->: b #

untrie :: (E V2 :->: b) -> E V2 -> b #

enumerate :: (E V2 :->: b) -> [(E V2, b)] #

HasTrie (E V1) Source # 

Associated Types

data (E V1) :->: b :: * #

Methods

trie :: (E V1 -> b) -> E V1 :->: b #

untrie :: (E V1 :->: b) -> E V1 -> b #

enumerate :: (E V1 :->: b) -> [(E V1, b)] #

Show (V0 Double) Source # 
Show (V0 Float) Source # 

Methods

showsPrec :: Int -> V0 Float -> ShowS #

show :: V0 Float -> String #

showList :: [V0 Float] -> ShowS #

Show (V0 Int) Source # 

Methods

showsPrec :: Int -> V0 Int -> ShowS #

show :: V0 Int -> String #

showList :: [V0 Int] -> ShowS #

Show (V0 Integer) Source # 
Show (V4 Double) Source # 
Show (V4 Float) Source # 

Methods

showsPrec :: Int -> V4 Float -> ShowS #

show :: V4 Float -> String #

showList :: [V4 Float] -> ShowS #

Show (V4 Int) Source # 

Methods

showsPrec :: Int -> V4 Int -> ShowS #

show :: V4 Int -> String #

showList :: [V4 Int] -> ShowS #

Show (V4 Integer) Source # 
Show (V3 Double) Source # 
Show (V3 Float) Source # 

Methods

showsPrec :: Int -> V3 Float -> ShowS #

show :: V3 Float -> String #

showList :: [V3 Float] -> ShowS #

Show (V3 Int) Source # 

Methods

showsPrec :: Int -> V3 Int -> ShowS #

show :: V3 Int -> String #

showList :: [V3 Int] -> ShowS #

Show (V3 Integer) Source # 
Show (V2 Double) Source # 
Show (V2 Float) Source # 

Methods

showsPrec :: Int -> V2 Float -> ShowS #

show :: V2 Float -> String #

showList :: [V2 Float] -> ShowS #

Show (V2 Int) Source # 

Methods

showsPrec :: Int -> V2 Int -> ShowS #

show :: V2 Int -> String #

showList :: [V2 Int] -> ShowS #

Show (V2 Integer) Source # 
Show (V1 Double) Source # 
Show (V1 Float) Source # 

Methods

showsPrec :: Int -> V1 Float -> ShowS #

show :: V1 Float -> String #

showList :: [V1 Float] -> ShowS #

Show (V1 Int) Source # 

Methods

showsPrec :: Int -> V1 Int -> ShowS #

show :: V1 Int -> String #

showList :: [V1 Int] -> ShowS #

Show (V1 Integer) Source # 
Num s => HasCross2 (V2 s) Source # 

Methods

cross2 :: V2 s -> V2 s #

Num s => HasCross3 (V3 s) Source # 

Methods

cross3 :: V3 s -> V3 s -> V3 s #

Num s => AffineSpace (V0 s) Source # 

Associated Types

type Diff (V0 s) :: * #

Methods

(.-.) :: V0 s -> V0 s -> Diff (V0 s) #

(.+^) :: V0 s -> Diff (V0 s) -> V0 s #

Num s => AffineSpace (V4 s) Source # 

Associated Types

type Diff (V4 s) :: * #

Methods

(.-.) :: V4 s -> V4 s -> Diff (V4 s) #

(.+^) :: V4 s -> Diff (V4 s) -> V4 s #

Num s => AffineSpace (V3 s) Source # 

Associated Types

type Diff (V3 s) :: * #

Methods

(.-.) :: V3 s -> V3 s -> Diff (V3 s) #

(.+^) :: V3 s -> Diff (V3 s) -> V3 s #

Num s => AffineSpace (V2 s) Source # 

Associated Types

type Diff (V2 s) :: * #

Methods

(.-.) :: V2 s -> V2 s -> Diff (V2 s) #

(.+^) :: V2 s -> Diff (V2 s) -> V2 s #

Num s => AffineSpace (V1 s) Source # 

Associated Types

type Diff (V1 s) :: * #

Methods

(.-.) :: V1 s -> V1 s -> Diff (V1 s) #

(.+^) :: V1 s -> Diff (V1 s) -> V1 s #

(Num s, AdditiveGroup s) => HasBasis (V0 s) Source # 

Associated Types

type Basis (V0 s) :: * #

Methods

basisValue :: Basis (V0 s) -> V0 s #

decompose :: V0 s -> [(Basis (V0 s), Scalar (V0 s))] #

decompose' :: V0 s -> Basis (V0 s) -> Scalar (V0 s) #

(Num s, AdditiveGroup s) => HasBasis (V4 s) Source # 

Associated Types

type Basis (V4 s) :: * #

Methods

basisValue :: Basis (V4 s) -> V4 s #

decompose :: V4 s -> [(Basis (V4 s), Scalar (V4 s))] #

decompose' :: V4 s -> Basis (V4 s) -> Scalar (V4 s) #

(Num s, AdditiveGroup s) => HasBasis (V3 s) Source # 

Associated Types

type Basis (V3 s) :: * #

Methods

basisValue :: Basis (V3 s) -> V3 s #

decompose :: V3 s -> [(Basis (V3 s), Scalar (V3 s))] #

decompose' :: V3 s -> Basis (V3 s) -> Scalar (V3 s) #

(Num s, AdditiveGroup s) => HasBasis (V2 s) Source # 

Associated Types

type Basis (V2 s) :: * #

Methods

basisValue :: Basis (V2 s) -> V2 s #

decompose :: V2 s -> [(Basis (V2 s), Scalar (V2 s))] #

decompose' :: V2 s -> Basis (V2 s) -> Scalar (V2 s) #

(Num s, AdditiveGroup s) => HasBasis (V1 s) Source # 

Associated Types

type Basis (V1 s) :: * #

Methods

basisValue :: Basis (V1 s) -> V1 s #

decompose :: V1 s -> [(Basis (V1 s), Scalar (V1 s))] #

decompose' :: V1 s -> Basis (V1 s) -> Scalar (V1 s) #

Num s => VectorSpace (V0 s) Source # 

Associated Types

type Scalar (V0 s) :: * #

Methods

(*^) :: Scalar (V0 s) -> V0 s -> V0 s #

Num s => VectorSpace (V4 s) Source # 

Associated Types

type Scalar (V4 s) :: * #

Methods

(*^) :: Scalar (V4 s) -> V4 s -> V4 s #

Num s => VectorSpace (V3 s) Source # 

Associated Types

type Scalar (V3 s) :: * #

Methods

(*^) :: Scalar (V3 s) -> V3 s -> V3 s #

Num s => VectorSpace (V2 s) Source # 

Associated Types

type Scalar (V2 s) :: * #

Methods

(*^) :: Scalar (V2 s) -> V2 s -> V2 s #

Num s => VectorSpace (V1 s) Source # 

Associated Types

type Scalar (V1 s) :: * #

Methods

(*^) :: Scalar (V1 s) -> V1 s -> V1 s #

(Num s, AdditiveGroup s) => InnerSpace (V0 s) Source # 

Methods

(<.>) :: V0 s -> V0 s -> Scalar (V0 s) #

(Num s, AdditiveGroup s) => InnerSpace (V4 s) Source # 

Methods

(<.>) :: V4 s -> V4 s -> Scalar (V4 s) #

(Num s, AdditiveGroup s) => InnerSpace (V3 s) Source # 

Methods

(<.>) :: V3 s -> V3 s -> Scalar (V3 s) #

(Num s, AdditiveGroup s) => InnerSpace (V2 s) Source # 

Methods

(<.>) :: V2 s -> V2 s -> Scalar (V2 s) #

(Num s, AdditiveGroup s) => InnerSpace (V1 s) Source # 

Methods

(<.>) :: V1 s -> V1 s -> Scalar (V1 s) #

Num s => AdditiveGroup (V0 s) Source # 

Methods

zeroV :: V0 s #

(^+^) :: V0 s -> V0 s -> V0 s #

negateV :: V0 s -> V0 s #

(^-^) :: V0 s -> V0 s -> V0 s #

Num s => AdditiveGroup (V4 s) Source # 

Methods

zeroV :: V4 s #

(^+^) :: V4 s -> V4 s -> V4 s #

negateV :: V4 s -> V4 s #

(^-^) :: V4 s -> V4 s -> V4 s #

Num s => AdditiveGroup (V3 s) Source # 

Methods

zeroV :: V3 s #

(^+^) :: V3 s -> V3 s -> V3 s #

negateV :: V3 s -> V3 s #

(^-^) :: V3 s -> V3 s -> V3 s #

Num s => AdditiveGroup (V2 s) Source # 

Methods

zeroV :: V2 s #

(^+^) :: V2 s -> V2 s -> V2 s #

negateV :: V2 s -> V2 s #

(^-^) :: V2 s -> V2 s -> V2 s #

Num s => AdditiveGroup (V1 s) Source # 

Methods

zeroV :: V1 s #

(^+^) :: V1 s -> V1 s -> V1 s #

negateV :: V1 s -> V1 s #

(^-^) :: V1 s -> V1 s -> V1 s #

Num s => AffineSpace (Point V0 s) Source # 

Associated Types

type Diff (Point V0 s) :: * #

Methods

(.-.) :: Point V0 s -> Point V0 s -> Diff (Point V0 s) #

(.+^) :: Point V0 s -> Diff (Point V0 s) -> Point V0 s #

Num s => AffineSpace (Point V4 s) Source # 

Associated Types

type Diff (Point V4 s) :: * #

Methods

(.-.) :: Point V4 s -> Point V4 s -> Diff (Point V4 s) #

(.+^) :: Point V4 s -> Diff (Point V4 s) -> Point V4 s #

Num s => AffineSpace (Point V3 s) Source # 

Associated Types

type Diff (Point V3 s) :: * #

Methods

(.-.) :: Point V3 s -> Point V3 s -> Diff (Point V3 s) #

(.+^) :: Point V3 s -> Diff (Point V3 s) -> Point V3 s #

Num s => AffineSpace (Point V2 s) Source # 

Associated Types

type Diff (Point V2 s) :: * #

Methods

(.-.) :: Point V2 s -> Point V2 s -> Diff (Point V2 s) #

(.+^) :: Point V2 s -> Diff (Point V2 s) -> Point V2 s #

Num s => AffineSpace (Point V1 s) Source # 

Associated Types

type Diff (Point V1 s) :: * #

Methods

(.-.) :: Point V1 s -> Point V1 s -> Diff (Point V1 s) #

(.+^) :: Point V1 s -> Diff (Point V1 s) -> Point V1 s #