linear-1.21.3: Linear Algebra

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

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 # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.V0

Methods

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

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

MonadFix V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

Applicative V0 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.V0

Associated Types

type Rep V0 :: Type #

Methods

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

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

Eq1 V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

Ord1 V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

Read1 V0 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.V0

Methods

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

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

MonadZip V0 Source # 
Instance details

Defined in Linear.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 Source # 
Instance details

Defined in Linear.V0

Methods

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

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

Hashable1 V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

Apply V0 Source # 
Instance details

Defined in Linear.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 #

Bind V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

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

Additive V0 Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Associated Types

type Size V0 :: Nat Source #

Methods

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

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

Trace V0 Source # 
Instance details

Defined in Linear.Trace

Methods

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

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

Affine V0 Source # 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V0 :: Type -> Type 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 # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.Algebra

Methods

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

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

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

Defined in Linear.Algebra

Methods

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

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

Bounded (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

minBound :: V0 a #

maxBound :: V0 a #

Enum (V0 a) Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Methods

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

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

Floating (V0 a) Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Methods

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

recip :: V0 a -> V0 a #

fromRational :: Rational -> V0 a #

Data a => Data (V0 a) Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Show (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

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

show :: V0 a -> String #

showList :: [V0 a] -> ShowS #

Ix (V0 a) Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Associated Types

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

Methods

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

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

Semigroup (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

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

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

stimes :: Integral b => b -> V0 a -> V0 a #

Monoid (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

mempty :: V0 a #

mappend :: V0 a -> V0 a -> V0 a #

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

Lift (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

lift :: V0 a -> Q Exp #

Storable (V0 a) Source # 
Instance details

Defined in Linear.V0

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 # 
Instance details

Defined in Linear.V0

Methods

put :: V0 a -> Put #

get :: Get (V0 a) #

putList :: [V0 a] -> Put #

Serial (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

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

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

Serialize (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

put :: Putter (V0 a) #

get :: Get (V0 a) #

NFData (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

rnf :: V0 a -> () #

Hashable (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

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

hash :: V0 a -> Int #

Unbox (V0 a) Source # 
Instance details

Defined in Linear.V0

Ixed (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

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

Random (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

randomR :: RandomGen g => (V0 a, V0 a) -> g -> (V0 a, g) #

random :: RandomGen g => g -> (V0 a, g) #

randomRs :: RandomGen g => (V0 a, V0 a) -> g -> [V0 a] #

randoms :: RandomGen g => g -> [V0 a] #

Epsilon (V0 a) Source # 
Instance details

Defined in Linear.V0

Methods

nearZero :: V0 a -> Bool Source #

Generic1 V0 Source # 
Instance details

Defined in Linear.V0

Associated Types

type Rep1 V0 :: k -> Type #

Methods

from1 :: V0 a -> Rep1 V0 a #

to1 :: Rep1 V0 a -> V0 a #

FunctorWithIndex (E V0) V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

imapped :: IndexedSetter (E V0) (V0 a) (V0 b) a b #

FoldableWithIndex (E V0) V0 Source # 
Instance details

Defined in Linear.V0

Methods

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

ifolded :: IndexedFold (E V0) (V0 a) 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 # 
Instance details

Defined in Linear.V0

Methods

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

itraversed :: IndexedTraversal (E V0) (V0 a) (V0 b) a b #

Each (V0 a) (V0 b) a b Source # 
Instance details

Defined in Linear.V0

Methods

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

type Rep V0 Source # 
Instance details

Defined in Linear.V0

type Rep V0 = E V0
type Size V0 Source # 
Instance details

Defined in Linear.V0

type Size V0 = 0
type Diff V0 Source # 
Instance details

Defined in Linear.Affine

type Diff V0 = V0
newtype MVector s (V0 a) Source # 
Instance details

Defined in Linear.V0

newtype MVector s (V0 a) = MV_V0 Int
type Rep (V0 a) Source # 
Instance details

Defined in Linear.V0

type Rep (V0 a) = D1 (MetaData "V0" "Linear.V0" "linear-1.21.3-4VKk0ANeJOgJLRUVoSPnwE" False) (C1 (MetaCons "V0" PrefixI False) (U1 :: Type -> Type))
newtype Vector (V0 a) Source # 
Instance details

Defined in Linear.V0

newtype Vector (V0 a) = V_V0 Int
type Index (V0 a) Source # 
Instance details

Defined in Linear.V0

type Index (V0 a) = E V0
type IxValue (V0 a) Source # 
Instance details

Defined in Linear.V0

type IxValue (V0 a) = a
type Rep1 V0 Source # 
Instance details

Defined in Linear.V0

type Rep1 V0 = D1 (MetaData "V0" "Linear.V0" "linear-1.21.3-4VKk0ANeJOgJLRUVoSPnwE" False) (C1 (MetaCons "V0" PrefixI False) (U1 :: Type -> Type))