linear-1.22: Linear Algebra

Copyright | (C) 2012-2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell2010

Linear.V0

Description

0-D Vectors

Synopsis

- data V0 a = V0

# Documentation

data V0 a Source #

A 0-dimensional vector

    >>> pure 1 :: V0 Int
    V0

    >>> V0 + V0
    V0

Constructors

V0 |

#### Instances

Instances details

Representable V0 Source # |
Instance details Defined in Linear.V0 Associated Types type Rep V0 Source # Methods tabulate :: (Rep V0 -> a) -> V0 a Source # index :: V0 a -> Rep V0 -> a Source #
MonadFix V0 Source # |
Instance details Defined in Linear.V0 Methods mfix :: (a -> V0 a) -> V0 a Source #
MonadZip V0 Source # |
Instance details Defined in Linear.V0 Methods mzip :: V0 a -> V0 b -> V0 (a, b) Source # mzipWith :: (a -> b -> c) -> V0 a -> V0 b -> V0 c Source # munzip :: V0 (a, b) -> (V0 a, V0 b) Source #
Foldable V0 Source # |

Instance details

Defined in Linear.V0

Methods

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

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

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

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

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

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

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

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

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

toList :: V0 a -> [a] Source #

null :: V0 a -> Bool Source #

length :: V0 a -> Int Source #

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

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

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

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

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

Eq1 V0 Source # |
Instance details Defined in Linear.V0 Methods liftEq :: (a -> b -> Bool) -> V0 a -> V0 b -> Bool Source #
Ord1 V0 Source # |
Instance details Defined in Linear.V0 Methods liftCompare :: (a -> b -> Ordering) -> V0 a -> V0 b -> Ordering Source #
Read1 V0 Source # |
Instance details Defined in Linear.V0 Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V0 a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V0 a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V0 a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V0 a] Source #
Show1 V0 Source # |
Instance details Defined in Linear.V0 Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V0 a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V0 a] -> ShowS Source #
Traversable V0 Source # |
Instance details Defined in Linear.V0 Methods traverse :: Applicative f => (a -> f b) -> V0 a -> f (V0 b) Source # sequenceA :: Applicative f => V0 (f a) -> f (V0 a) Source # mapM :: Monad m => (a -> m b) -> V0 a -> m (V0 b) Source # sequence :: Monad m => V0 (m a) -> m (V0 a) Source #
Applicative V0 Source # |
Instance details Defined in Linear.V0 Methods pure :: a -> V0 a Source # (<*>) :: V0 (a -> b) -> V0 a -> V0 b Source # liftA2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c Source # (*>) :: V0 a -> V0 b -> V0 b Source # (<*) :: V0 a -> V0 b -> V0 a Source #
Functor V0 Source # |
Instance details Defined in Linear.V0 Methods fmap :: (a -> b) -> V0 a -> V0 b Source # (<$) :: a -> V0 b -> V0 a Source #
Monad V0 Source # |
Instance details Defined in Linear.V0 Methods (>>=) :: V0 a -> (a -> V0 b) -> V0 b Source # (>>) :: V0 a -> V0 b -> V0 b Source # return :: a -> V0 a Source #
Serial1 V0 Source # |
Instance details Defined in Linear.V0 Methods serializeWith :: MonadPut m => (a -> m ()) -> V0 a -> m () Source # deserializeWith :: MonadGet m => m a -> m (V0 a) Source #
Distributive V0 Source # |
Instance details Defined in Linear.V0 Methods distribute :: Functor f => f (V0 a) -> V0 (f a) Source # collect :: Functor f => (a -> V0 b) -> f a -> V0 (f b) Source # distributeM :: Monad m => m (V0 a) -> V0 (m a) Source # collectM :: Monad m => (a -> V0 b) -> m a -> V0 (m b) Source #
Hashable1 V0 Source # |
Instance details Defined in Linear.V0 Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> V0 a -> Int 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 #
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 #
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 #
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 #
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 #
Apply V0 Source # |
Instance details Defined in Linear.V0 Methods (<.>) :: V0 (a -> b) -> V0 a -> V0 b Source # (.>) :: V0 a -> V0 b -> V0 b Source # (<.) :: V0 a -> V0 b -> V0 a Source # liftF2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c Source #
Bind V0 Source # |
Instance details Defined in Linear.V0 Methods (>>-) :: V0 a -> (a -> V0 b) -> V0 b Source # join :: V0 (V0 a) -> V0 a Source #
Generic1 V0 Source # |
Instance details Defined in Linear.V0 Associated Types type Rep1 V0 :: k -> Type Source # Methods from1 :: forall (a :: k). V0 a -> Rep1 V0 a Source # to1 :: forall (a :: k). Rep1 V0 a -> V0 a 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 #
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 #
Lift (V0 a :: Type) Source # |
Instance details Defined in Linear.V0 Methods lift :: Quote m => V0 a -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => V0 a -> Code m (V0 a) Source #
Vector Vector (V0 a) Source # |

Instance details

Defined in Linear.V0

Methods

basicUnsafeFreeze :: Mutable Vector s (V0 a) -> ST s (Vector (V0 a)) Source #

basicUnsafeThaw :: Vector (V0 a) -> ST s (Mutable Vector s (V0 a)) Source #

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

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

basicUnsafeIndexM :: Vector (V0 a) -> Int -> Box (V0 a) Source #

basicUnsafeCopy :: Mutable Vector s (V0 a) -> Vector (V0 a) -> ST s () Source #

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

MVector MVector (V0 a) Source # |

Instance details

Defined in Linear.V0

Methods

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

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

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

basicUnsafeNew :: Int -> ST s (MVector s (V0 a)) Source #

basicInitialize :: MVector s (V0 a) -> ST s () Source #

basicUnsafeReplicate :: Int -> V0 a -> ST s (MVector s (V0 a)) Source #

basicUnsafeRead :: MVector s (V0 a) -> Int -> ST s (V0 a) Source #

basicUnsafeWrite :: MVector s (V0 a) -> Int -> V0 a -> ST s () Source #

basicClear :: MVector s (V0 a) -> ST s () Source #

basicSet :: MVector s (V0 a) -> V0 a -> ST s () Source #

basicUnsafeCopy :: MVector s (V0 a) -> MVector s (V0 a) -> ST s () Source #

basicUnsafeMove :: MVector s (V0 a) -> MVector s (V0 a) -> ST s () Source #

basicUnsafeGrow :: MVector s (V0 a) -> Int -> ST s (MVector s (V0 a)) Source #

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

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

toConstr :: V0 a -> Constr Source #

dataTypeOf :: V0 a -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Storable (V0 a) Source # |

Instance details

Defined in Linear.V0

Methods

sizeOf :: V0 a -> Int Source #

alignment :: V0 a -> Int Source #

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

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

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

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

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

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

Monoid (V0 a) Source # |
Instance details Defined in Linear.V0 Methods mempty :: V0 a Source # mappend :: V0 a -> V0 a -> V0 a Source # mconcat :: [V0 a] -> V0 a Source #
Semigroup (V0 a) Source # |
Instance details Defined in Linear.V0 Methods (<>) :: V0 a -> V0 a -> V0 a Source # sconcat :: NonEmpty (V0 a) -> V0 a Source # stimes :: Integral b => b -> V0 a -> V0 a Source #
Bounded (V0 a) Source # |
Instance details Defined in Linear.V0 Methods minBound :: V0 a Source # maxBound :: V0 a Source #
Enum (V0 a) Source # |
Instance details Defined in Linear.V0 Methods succ :: V0 a -> V0 a Source # pred :: V0 a -> V0 a Source # toEnum :: Int -> V0 a Source # fromEnum :: V0 a -> Int Source # enumFrom :: V0 a -> [V0 a] Source # enumFromThen :: V0 a -> V0 a -> [V0 a] Source # enumFromTo :: V0 a -> V0 a -> [V0 a] Source # enumFromThenTo :: V0 a -> V0 a -> V0 a -> [V0 a] Source #
Floating (V0 a) Source # |

Instance details

Defined in Linear.V0

Methods

pi :: V0 a Source #

exp :: V0 a -> V0 a Source #

log :: V0 a -> V0 a Source #

sqrt :: V0 a -> V0 a Source #

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

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

sin :: V0 a -> V0 a Source #

cos :: V0 a -> V0 a Source #

tan :: V0 a -> V0 a Source #

asin :: V0 a -> V0 a Source #

acos :: V0 a -> V0 a Source #

atan :: V0 a -> V0 a Source #

sinh :: V0 a -> V0 a Source #

cosh :: V0 a -> V0 a Source #

tanh :: V0 a -> V0 a Source #

asinh :: V0 a -> V0 a Source #

acosh :: V0 a -> V0 a Source #

atanh :: V0 a -> V0 a Source #

log1p :: V0 a -> V0 a Source #

expm1 :: V0 a -> V0 a Source #

log1pexp :: V0 a -> V0 a Source #

log1mexp :: V0 a -> V0 a Source #

Generic (V0 a) Source # |
Instance details Defined in Linear.V0 Associated Types type Rep (V0 a) :: Type -> Type Source # Methods from :: V0 a -> Rep (V0 a) x Source # to :: Rep (V0 a) x -> V0 a Source #
Ix (V0 a) Source # |
Instance details Defined in Linear.V0 Methods range :: (V0 a, V0 a) -> [V0 a] Source # index :: (V0 a, V0 a) -> V0 a -> Int Source # unsafeIndex :: (V0 a, V0 a) -> V0 a -> Int Source # inRange :: (V0 a, V0 a) -> V0 a -> Bool Source # rangeSize :: (V0 a, V0 a) -> Int Source # unsafeRangeSize :: (V0 a, V0 a) -> Int Source #
Num (V0 a) Source # |
Instance details Defined in Linear.V0 Methods (+) :: V0 a -> V0 a -> V0 a Source # (-) :: V0 a -> V0 a -> V0 a Source # (*) :: V0 a -> V0 a -> V0 a Source # negate :: V0 a -> V0 a Source # abs :: V0 a -> V0 a Source # signum :: V0 a -> V0 a Source # fromInteger :: Integer -> V0 a Source #
Read (V0 a) Source # |
Instance details Defined in Linear.V0 Methods readsPrec :: Int -> ReadS (V0 a) Source # readList :: ReadS [V0 a] Source # readPrec :: ReadPrec (V0 a) Source # readListPrec :: ReadPrec [V0 a] Source #
Fractional (V0 a) Source # |
Instance details Defined in Linear.V0 Methods (/) :: V0 a -> V0 a -> V0 a Source # recip :: V0 a -> V0 a Source # fromRational :: Rational -> V0 a Source #
Show (V0 a) Source # |
Instance details Defined in Linear.V0 Methods showsPrec :: Int -> V0 a -> ShowS Source # show :: V0 a -> String Source # showList :: [V0 a] -> ShowS Source #
Binary (V0 a) Source # |
Instance details Defined in Linear.V0 Methods put :: V0 a -> Put Source # get :: Get (V0 a) Source # putList :: [V0 a] -> Put Source #
Serial (V0 a) Source # |
Instance details Defined in Linear.V0 Methods serialize :: MonadPut m => V0 a -> m () Source # deserialize :: MonadGet m => m (V0 a) Source #
Serialize (V0 a) Source # |
Instance details Defined in Linear.V0 Methods put :: Putter (V0 a) Source # get :: Get (V0 a) Source #
NFData (V0 a) Source # |
Instance details Defined in Linear.V0 Methods rnf :: V0 a -> () Source #
Eq (V0 a) Source # |
Instance details Defined in Linear.V0 Methods (==) :: V0 a -> V0 a -> Bool Source # (/=) :: V0 a -> V0 a -> Bool Source #
Ord (V0 a) Source # |
Instance details Defined in Linear.V0 Methods compare :: V0 a -> V0 a -> Ordering Source # (<) :: V0 a -> V0 a -> Bool Source # (<=) :: V0 a -> V0 a -> Bool Source # (>) :: V0 a -> V0 a -> Bool Source # (>=) :: V0 a -> V0 a -> Bool Source # max :: V0 a -> V0 a -> V0 a Source # min :: V0 a -> V0 a -> V0 a Source #
Hashable (V0 a) Source # |
Instance details Defined in Linear.V0 Methods hashWithSalt :: Int -> V0 a -> Int Source # hash :: V0 a -> Int Source #
Ixed (V0 a) Source # |
Instance details Defined in Linear.V0 Methods ix :: Index (V0 a) -> Traversal' (V0 a) (IxValue (V0 a)) Source #
Epsilon (V0 a) Source # |
Instance details Defined in Linear.V0 Methods nearZero :: V0 a -> Bool Source #
Random (V0 a) Source # |
Instance details Defined in Linear.V0 Methods randomR :: RandomGen g => (V0 a, V0 a) -> g -> (V0 a, g) Source # random :: RandomGen g => g -> (V0 a, g) Source # randomRs :: RandomGen g => (V0 a, V0 a) -> g -> [V0 a] Source # randoms :: RandomGen g => g -> [V0 a] Source #
Unbox (V0 a) Source # |
Instance details Defined in Linear.V0
FoldableWithIndex (E V0) V0 Source # |

Instance details

Defined in Linear.V0

Methods

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

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

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

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

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

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

FunctorWithIndex (E V0) V0 Source # |
Instance details Defined in Linear.V0 Methods imap :: (E V0 -> a -> b) -> V0 a -> V0 b Source #
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) Source #
Each (V0 a) (V0 b) a b Source # |
Instance details Defined in Linear.V0 Methods each :: Traversal (V0 a) (V0 b) a b Source #
type Rep V0 Source # |
Instance details Defined in Linear.V0 type Rep V0 = E V0
type Diff V0 Source # |
Instance details Defined in Linear.Affine type Diff V0 = V0
type Size V0 Source # |
Instance details Defined in Linear.V0 type Size V0 = 0
type Rep1 V0 Source # |
Instance details Defined in Linear.V0 type Rep1 V0 = D1 ('MetaData "V0" "Linear.V0" "linear-1.22-CRgBRfHw0OsL7QUZ7C9Pko" 'False) (C1 ('MetaCons "V0" 'PrefixI 'False) (U1 :: Type -> Type))
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.22-CRgBRfHw0OsL7QUZ7C9Pko" 'False) (C1 ('MetaCons "V0" 'PrefixI 'False) (U1 :: Type -> Type))
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
newtype Vector (V0 a) Source # |
Instance details Defined in Linear.V0 newtype Vector (V0 a) = V_V0 Int