Copyright | 2014 Edward Kmett Charles Durham [2015..2020] Trevor L. McDonell |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Trevor L. McDonell <trevor.mcdonell@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
1-D Vectors
Documentation
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
V1 a |
Instances
Monad V1 | |
Functor V1 | |
MonadFix V1 | |
Applicative V1 | |
Foldable V1 | |
Defined in Linear.V1 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 # elem :: Eq a => a -> V1 a -> Bool # maximum :: Ord a => V1 a -> a # | |
Traversable V1 | |
Functor V1 Source # | |
Distributive V1 | |
Representable V1 | |
Eq1 V1 | |
Ord1 V1 | |
Read1 V1 | |
Show1 V1 | |
MonadZip V1 | |
Serial1 V1 | |
Defined in Linear.V1 serializeWith :: MonadPut m => (a -> m ()) -> V1 a -> m () # deserializeWith :: MonadGet m => m a -> m (V1 a) # | |
Hashable1 V1 | |
Apply V1 | |
Traversable1 V1 | |
Trace V1 | |
R1 V1 | |
Finite V1 | |
Metric V1 | |
Additive V1 | |
Foldable1 V1 | |
Bind V1 | |
Additive V1 Source # | |
Defined in Data.Array.Accelerate.Linear.V1 | |
Metric V1 Source # | |
Defined in Data.Array.Accelerate.Linear.V1 dot :: (Num a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # quadrance :: (Num a, Box V1 a) => Exp (V1 a) -> Exp a Source # qd :: (Num a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # distance :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # norm :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp a Source # signorm :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) Source # | |
R1 V1 Source # | |
Trace V1 Source # | |
(Lift Exp a, Elt (Plain a)) => Lift Exp (V1 a) Source # | |
Elt a => Unlift Exp (V1 (Exp a)) Source # | |
Unbox a => Vector Vector (V1 a) | |
Defined in Linear.V1 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 () # | |
Unbox a => MVector MVector (V1 a) | |
Defined in Linear.V1 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 (Exp (V1 a)) Source # | |
Bounded a => Bounded (V1 a) | |
Eq a => Eq (V1 a) | |
Floating a => Floating (Exp (V1 a)) Source # | |
Defined in Data.Array.Accelerate.Linear.V1 exp :: Exp (V1 a) -> Exp (V1 a) # log :: Exp (V1 a) -> Exp (V1 a) # sqrt :: Exp (V1 a) -> Exp (V1 a) # (**) :: Exp (V1 a) -> Exp (V1 a) -> Exp (V1 a) # logBase :: Exp (V1 a) -> Exp (V1 a) -> Exp (V1 a) # sin :: Exp (V1 a) -> Exp (V1 a) # cos :: Exp (V1 a) -> Exp (V1 a) # tan :: Exp (V1 a) -> Exp (V1 a) # asin :: Exp (V1 a) -> Exp (V1 a) # acos :: Exp (V1 a) -> Exp (V1 a) # atan :: Exp (V1 a) -> Exp (V1 a) # sinh :: Exp (V1 a) -> Exp (V1 a) # cosh :: Exp (V1 a) -> Exp (V1 a) # tanh :: Exp (V1 a) -> Exp (V1 a) # asinh :: Exp (V1 a) -> Exp (V1 a) # acosh :: Exp (V1 a) -> Exp (V1 a) # atanh :: Exp (V1 a) -> Exp (V1 a) # log1p :: Exp (V1 a) -> Exp (V1 a) # expm1 :: Exp (V1 a) -> Exp (V1 a) # | |
Floating a => Floating (V1 a) | |
Floating a => Fractional (Exp (V1 a)) Source # | |
Fractional a => Fractional (V1 a) | |
Data a => Data (V1 a) | |
Defined in Linear.V1 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) # 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 (Exp (V1 a)) Source # | |
Defined in Data.Array.Accelerate.Linear.V1 | |
Num a => Num (V1 a) | |
Ord a => Ord (V1 a) | |
Read a => Read (V1 a) | |
Show a => Show (V1 a) | |
Ix a => Ix (V1 a) | |
Generic (V1 a) | |
Semigroup a => Semigroup (V1 a) | |
Monoid a => Monoid (V1 a) | |
Lift a => Lift (V1 a) | |
Ord a => Ord (V1 a) Source # | |
Defined in Data.Array.Accelerate.Linear.V1 | |
Eq a => Eq (V1 a) Source # | |
Elt a => Elt (V1 a) Source # | |
Storable a => Storable (V1 a) | |
Binary a => Binary (V1 a) | |
Serial a => Serial (V1 a) | |
Serialize a => Serialize (V1 a) | |
NFData a => NFData (V1 a) | |
Hashable a => Hashable (V1 a) | |
Unbox a => Unbox (V1 a) | |
Defined in Linear.V1 | |
Ixed (V1 a) | |
Epsilon a => Epsilon (V1 a) | |
Random a => Random (V1 a) | |
Epsilon a => Epsilon (V1 a) Source # | |
Generic1 V1 | |
FunctorWithIndex (E V1) V1 | |
FoldableWithIndex (E V1) V1 | |
TraversableWithIndex (E V1) V1 | |
Defined in Linear.V1 itraverse :: Applicative f => (E V1 -> a -> f b) -> V1 a -> f (V1 b) # itraversed :: IndexedTraversal (E V1) (V1 a) (V1 b) a b # | |
Each (V1 a) (V1 b) a b | |
Field1 (V1 a) (V1 b) a b | |
(Elt a, Elt b) => Each (Exp (V1 a)) (Exp (V1 b)) (Exp a) (Exp b) Source # | |
type Rep V1 | |
type Size V1 | |
newtype MVector s (V1 a) | |
type Rep (V1 a) | |
type EltR (V1 a) | |
Defined in Data.Array.Accelerate.Linear.V1 | |
type Plain (V1 a) Source # | |
Defined in Data.Array.Accelerate.Linear.V1 | |
newtype Vector (V1 a) | |
type Index (V1 a) | |
type IxValue (V1 a) | |
type Rep1 V1 | |
class R1 t => R1 t where Source #
A space that has at least 1 basis vector _x
.
Nothing
_x :: (Elt a, Box t a) => Lens' (Exp (t a)) (Exp a) Source #
>>>
test $ (V1_ 2 :: Exp (V1 Int)) ^. _x
2
>>>
test $ (V1_ 2 :: Exp (V1 Int)) & _x .~ 3
V1 3
Orphan instances
Functor V1 Source # | |
Additive V1 Source # | |
Metric V1 Source # | |
dot :: (Num a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # quadrance :: (Num a, Box V1 a) => Exp (V1 a) -> Exp a Source # qd :: (Num a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # distance :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) -> Exp a Source # norm :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp a Source # signorm :: (Floating a, Box V1 a) => Exp (V1 a) -> Exp (V1 a) Source # | |
(Lift Exp a, Elt (Plain a)) => Lift Exp (V1 a) Source # | |
Elt a => Unlift Exp (V1 (Exp a)) Source # | |
Bounded a => Bounded (Exp (V1 a)) Source # | |
Floating a => Floating (Exp (V1 a)) Source # | |
exp :: Exp (V1 a) -> Exp (V1 a) # log :: Exp (V1 a) -> Exp (V1 a) # sqrt :: Exp (V1 a) -> Exp (V1 a) # (**) :: Exp (V1 a) -> Exp (V1 a) -> Exp (V1 a) # logBase :: Exp (V1 a) -> Exp (V1 a) -> Exp (V1 a) # sin :: Exp (V1 a) -> Exp (V1 a) # cos :: Exp (V1 a) -> Exp (V1 a) # tan :: Exp (V1 a) -> Exp (V1 a) # asin :: Exp (V1 a) -> Exp (V1 a) # acos :: Exp (V1 a) -> Exp (V1 a) # atan :: Exp (V1 a) -> Exp (V1 a) # sinh :: Exp (V1 a) -> Exp (V1 a) # cosh :: Exp (V1 a) -> Exp (V1 a) # tanh :: Exp (V1 a) -> Exp (V1 a) # asinh :: Exp (V1 a) -> Exp (V1 a) # acosh :: Exp (V1 a) -> Exp (V1 a) # atanh :: Exp (V1 a) -> Exp (V1 a) # log1p :: Exp (V1 a) -> Exp (V1 a) # expm1 :: Exp (V1 a) -> Exp (V1 a) # | |
Floating a => Fractional (Exp (V1 a)) Source # | |
Num a => Num (Exp (V1 a)) Source # | |
Ord a => Ord (V1 a) Source # | |
Eq a => Eq (V1 a) Source # | |
Elt a => Elt (V1 a) Source # | |
Epsilon a => Epsilon (V1 a) Source # | |
(Elt a, Elt b) => Each (Exp (V1 a)) (Exp (V1 b)) (Exp a) (Exp b) Source # | |