linear-1.20.6: Linear Algebra

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

Linear.V0

Description

0-D Vectors

Synopsis

Documentation

data V0 a Source #

A 0-dimensional vector

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

Constructors

V0 

Instances

Monad V0 Source # 

Methods

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

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

return :: a -> V0 a #

fail :: String -> V0 a #

Functor V0 Source # 

Methods

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

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

MonadFix V0 Source # 

Methods

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

Applicative V0 Source # 

Methods

pure :: a -> V0 a #

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

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

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

Foldable V0 Source # 

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 Source # 

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

Generic1 V0 Source # 

Associated Types

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

Methods

from1 :: V0 a -> Rep1 V0 a #

to1 :: Rep1 V0 a -> V0 a #

Distributive V0 Source # 

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 Source # 

Associated Types

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

Methods

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

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

Eq1 V0 Source # 

Methods

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

Ord1 V0 Source # 

Methods

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

Read1 V0 Source # 

Methods

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

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

Show1 V0 Source # 

Methods

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

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

MonadZip V0 Source # 

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 Source # 

Methods

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

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

Apply V0 Source # 

Methods

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

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

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

Bind V0 Source # 

Methods

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

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

Additive V0 Source # 

Methods

zero :: Num a => V0 a Source #

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

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

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

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

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

Metric V0 Source # 

Methods

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

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

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

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

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

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

Finite V0 Source # 

Associated Types

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

Methods

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

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

Trace V0 Source # 

Methods

trace :: Num a => V0 (V0 a) -> a Source #

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

Affine V0 Source # 

Associated Types

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

Methods

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

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

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

Vector Vector (V0 a) Source # 

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

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

Num r => Coalgebra r (E V0) Source # 

Methods

comult :: (E V0 -> r) -> E V0 -> E V0 -> r Source #

counital :: (E V0 -> r) -> r Source #

Num r => Algebra r (E V0) Source # 

Methods

mult :: (E V0 -> E V0 -> r) -> E V0 -> r Source #

unital :: r -> E V0 -> r Source #

Bounded (V0 a) Source # 

Methods

minBound :: V0 a #

maxBound :: V0 a #

Enum (V0 a) Source # 

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

Methods

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

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

Floating (V0 a) Source # 

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

Methods

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

recip :: V0 a -> V0 a #

fromRational :: Rational -> V0 a #

Data a => Data (V0 a) Source # 

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

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

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) Source # 
Show (V0 a) Source # 

Methods

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

show :: V0 a -> String #

showList :: [V0 a] -> ShowS #

Ix (V0 a) Source # 

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

Associated Types

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

Methods

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

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

Storable (V0 a) Source # 

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

Methods

put :: V0 a -> Put #

get :: Get (V0 a) #

putList :: [V0 a] -> Put #

Serial (V0 a) Source # 

Methods

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

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

Serialize (V0 a) Source # 

Methods

put :: Putter (V0 a) #

get :: Get (V0 a) #

NFData (V0 a) Source # 

Methods

rnf :: V0 a -> () #

Hashable (V0 a) Source # 

Methods

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

hash :: V0 a -> Int #

Unbox (V0 a) Source # 
Ixed (V0 a) Source # 

Methods

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

Epsilon (V0 a) Source # 

Methods

nearZero :: V0 a -> Bool Source #

FunctorWithIndex (E V0) V0 Source # 

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 Source # 

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 Source # 

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 Source # 

Methods

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

type Rep1 V0 Source # 
type Rep1 V0 = D1 (MetaData "V0" "Linear.V0" "linear-1.20.6-7GMSraBBXwf75Iqz3D0i5l" False) (C1 (MetaCons "V0" PrefixI False) U1)
type Rep V0 Source # 
type Rep V0 = E V0
type Size V0 Source # 
type Size V0 = 0
type Diff V0 Source # 
type Diff V0 = V0
data MVector s (V0 a) Source # 
data MVector s (V0 a) = MV_V0 Int
type Rep (V0 a) Source # 
type Rep (V0 a) = D1 (MetaData "V0" "Linear.V0" "linear-1.20.6-7GMSraBBXwf75Iqz3D0i5l" False) (C1 (MetaCons "V0" PrefixI False) U1)
data Vector (V0 a) Source # 
data Vector (V0 a) = V_V0 Int
type Index (V0 a) Source # 
type Index (V0 a) = E V0
type IxValue (V0 a) Source # 
type IxValue (V0 a) = a