| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
SDL.Vect
Description
SDL's vector representation.
By default, re-exports the Linear and Linear.Affine modules from the
linear package. With the no-linear Cabal flag, instead exports a
duplicate implementation of the V2, V3, V4 and Point types from
SDL.Internal.Vect, which provides as many instances as possible for those
types while avoiding any additional dependencies.
Documentation
module Linear.Affine
module Linear
Point
newtype Point (f :: Type -> Type) a Source #
A handy wrapper to help distinguish points from vectors at the type level
Constructors
| P (f a) |
Instances
| Unbox (f a) => Vector Vector (Point f a) | |
Defined in Linear.Affine Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Point f a) -> m (Vector (Point f a)) Source # basicUnsafeThaw :: PrimMonad m => Vector (Point f a) -> m (Mutable Vector (PrimState m) (Point f a)) Source # basicLength :: Vector (Point f a) -> Int Source # basicUnsafeSlice :: Int -> Int -> Vector (Point f a) -> Vector (Point f a) Source # basicUnsafeIndexM :: Monad m => Vector (Point f a) -> Int -> m (Point f a) Source # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Point f a) -> Vector (Point f a) -> m () Source # elemseq :: Vector (Point f a) -> Point f a -> b -> b Source # | |
| Unbox (f a) => MVector MVector (Point f a) | |
Defined in Linear.Affine Methods basicLength :: MVector s (Point f a) -> Int Source # basicUnsafeSlice :: Int -> Int -> MVector s (Point f a) -> MVector s (Point f a) Source # basicOverlaps :: MVector s (Point f a) -> MVector s (Point f a) -> Bool Source # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Point f a)) Source # basicInitialize :: PrimMonad m => MVector (PrimState m) (Point f a) -> m () Source # basicUnsafeReplicate :: PrimMonad m => Int -> Point f a -> m (MVector (PrimState m) (Point f a)) Source # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Point f a) -> Int -> m (Point f a) Source # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Point f a) -> Int -> Point f a -> m () Source # basicClear :: PrimMonad m => MVector (PrimState m) (Point f a) -> m () Source # basicSet :: PrimMonad m => MVector (PrimState m) (Point f a) -> Point f a -> m () Source # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Point f a) -> MVector (PrimState m) (Point f a) -> m () Source # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Point f a) -> MVector (PrimState m) (Point f a) -> m () Source # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Point f a) -> Int -> m (MVector (PrimState m) (Point f a)) Source # | |
| Monad f => Monad (Point f) | |
| Functor f => Functor (Point f) | |
| Applicative f => Applicative (Point f) | |
| Foldable f => Foldable (Point f) | |
Defined in Linear.Affine Methods fold :: Monoid m => Point f m -> m foldMap :: Monoid m => (a -> m) -> Point f a -> m foldMap' :: Monoid m => (a -> m) -> Point f a -> m foldr :: (a -> b -> b) -> b -> Point f a -> b foldr' :: (a -> b -> b) -> b -> Point f a -> b foldl :: (b -> a -> b) -> b -> Point f a -> b foldl' :: (b -> a -> b) -> b -> Point f a -> b foldr1 :: (a -> a -> a) -> Point f a -> a foldl1 :: (a -> a -> a) -> Point f a -> a elem :: Eq a => a -> Point f a -> Bool maximum :: Ord a => Point f a -> a minimum :: Ord a => Point f a -> a | |
| Traversable f => Traversable (Point f) | |
| Representable f => Representable (Point f) | |
| Additive f => Affine (Point f) | |
Defined in Linear.Affine | |
| R4 f => R4 (Point f) | |
| R3 f => R3 (Point f) | |
| R2 f => R2 (Point f) | |
| R1 f => R1 (Point f) | |
Defined in Linear.Affine | |
| Finite f => Finite (Point f) | |
| Metric f => Metric (Point f) | |
| Additive f => Additive (Point f) | |
Defined in Linear.Affine Methods zero :: Num a => Point f a Source # (^+^) :: Num a => Point f a -> Point f a -> Point f a Source # (^-^) :: Num a => Point f a -> Point f a -> Point f a Source # lerp :: Num a => a -> Point f a -> Point f a -> Point f a Source # liftU2 :: (a -> a -> a) -> Point f a -> Point f a -> Point f a Source # liftI2 :: (a -> b -> c) -> Point f a -> Point f b -> Point f c Source # | |
| Eq1 f => Eq1 (Point f) | |
Defined in Linear.Affine | |
| Ord1 f => Ord1 (Point f) | |
Defined in Linear.Affine Methods liftCompare :: (a -> b -> Ordering) -> Point f a -> Point f b -> Ordering | |
| Read1 f => Read1 (Point f) | |
Defined in Linear.Affine Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Point f a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Point f a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Point f a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Point f a] | |
| Show1 f => Show1 (Point f) | |
Defined in Linear.Affine Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Point f a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Point f a] -> ShowS | |
| Apply f => Apply (Point f) | |
| Bind f => Bind (Point f) | |
| Distributive f => Distributive (Point f) | |
Defined in Linear.Affine | |
| Hashable1 f => Hashable1 (Point f) | |
Defined in Linear.Affine Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> Point f a -> Int | |
| Serial1 f => Serial1 (Point f) | |
Defined in Linear.Affine Methods serializeWith :: MonadPut m => (a -> m ()) -> Point f a -> m () deserializeWith :: MonadGet m => m a -> m (Point f a) | |
| Generic1 (Point f :: Type -> Type) | |
| Eq (f a) => Eq (Point f a) | |
| Fractional (f a) => Fractional (Point f a) | |
Defined in Linear.Affine | |
| (Typeable f, Typeable a, Data (f a)) => Data (Point f a) | |
Defined in Linear.Affine Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Point f a -> c (Point f a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Point f a) toConstr :: Point f a -> Constr dataTypeOf :: Point f a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Point f a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Point f a)) gmapT :: (forall b. Data b => b -> b) -> Point f a -> Point f a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Point f a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Point f a -> r gmapQ :: (forall d. Data d => d -> u) -> Point f a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Point f a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Point f a -> m (Point f a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Point f a -> m (Point f a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Point f a -> m (Point f a) | |
| Num (f a) => Num (Point f a) | |
| Ord (f a) => Ord (Point f a) | |
Defined in Linear.Affine | |
| Read (f a) => Read (Point f a) | |
Defined in Linear.Affine | |
| Show (f a) => Show (Point f a) | |
| Ix (f a) => Ix (Point f a) | |
Defined in Linear.Affine Methods range :: (Point f a, Point f a) -> [Point f a] index :: (Point f a, Point f a) -> Point f a -> Int unsafeIndex :: (Point f a, Point f a) -> Point f a -> Int inRange :: (Point f a, Point f a) -> Point f a -> Bool rangeSize :: (Point f a, Point f a) -> Int unsafeRangeSize :: (Point f a, Point f a) -> Int | |
| Generic (Point f a) | |
| Epsilon (f a) => Epsilon (Point f a) | |
Defined in Linear.Affine | |
| Unbox (f a) => Unbox (Point f a) | |
Defined in Linear.Affine | |
| Storable (f a) => Storable (Point f a) | |
Defined in Linear.Affine Methods peekElemOff :: Ptr (Point f a) -> Int -> IO (Point f a) pokeElemOff :: Ptr (Point f a) -> Int -> Point f a -> IO () peekByteOff :: Ptr b -> Int -> IO (Point f a) pokeByteOff :: Ptr b -> Int -> Point f a -> IO () | |
| Binary (f a) => Binary (Point f a) | |
| NFData (f a) => NFData (Point f a) | |
Defined in Linear.Affine | |
| Hashable (f a) => Hashable (Point f a) | |
Defined in Linear.Affine | |
| Ixed (f a) => Ixed (Point f a) | |
Defined in Linear.Affine | |
| Serial (f a) => Serial (Point f a) | |
Defined in Linear.Affine | |
| Serialize (f a) => Serialize (Point f a) | |
Defined in Linear.Affine | |
| Wrapped (Point f a) | |
Defined in Linear.Affine Associated Types type Unwrapped (Point f a) | |
| t ~ Point g b => Rewrapped (Point f a) t | |
Defined in Linear.Affine | |
| Traversable f => Each (Point f a) (Point f b) a b | |
Defined in Linear.Affine | |
| newtype MVector s (Point f a) | |
Defined in Linear.Affine | |
| type Diff (Point f) | |
Defined in Linear.Affine | |
| type Size (Point f) | |
Defined in Linear.Affine | |
| type Rep (Point f) | |
Defined in Linear.Affine type Rep (Point f) = Rep f | |
| type Rep1 (Point f :: Type -> Type) | |
Defined in Linear.Affine type Rep1 (Point f :: Type -> Type) = D1 ('MetaData "Point" "Linear.Affine" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'True) (C1 ('MetaCons "P" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f))) | |
| type Rep (Point f a) | |
Defined in Linear.Affine type Rep (Point f a) = D1 ('MetaData "Point" "Linear.Affine" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'True) (C1 ('MetaCons "P" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a)))) | |
| newtype Vector (Point f a) | |
Defined in Linear.Affine | |
| type Index (Point f a) | |
Defined in Linear.Affine type Index (Point f a) = Index (f a) | |
| type IxValue (Point f a) | |
Defined in Linear.Affine type IxValue (Point f a) = IxValue (f a) | |
| type Unwrapped (Point f a) | |
Defined in Linear.Affine type Unwrapped (Point f a) = f a | |
Vectors
A 2-dimensional vector
>>>pure 1 :: V2 IntV2 1 1
>>>V2 1 2 + V2 3 4V2 4 6
>>>V2 1 2 * V2 3 4V2 3 8
>>>sum (V2 1 2)3
Constructors
| V2 !a !a |
Instances
| Monad V2 | |
| Functor V2 | |
| MonadFix V2 | |
| Applicative V2 | |
| Foldable V2 | |
Defined in Linear.V2 Methods foldMap :: Monoid m => (a -> m) -> V2 a -> 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 | |
| Traversable V2 | |
| Representable V2 | |
| Affine V2 | |
| Trace V2 | |
| R2 V2 | |
| R1 V2 | |
| Finite V2 | |
| Metric V2 | |
| Additive V2 | |
Defined in Linear.V2 | |
| Eq1 V2 | |
| Ord1 V2 | |
Defined in Linear.V2 Methods liftCompare :: (a -> b -> Ordering) -> V2 a -> V2 b -> Ordering | |
| Read1 V2 | |
Defined in Linear.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 | |
Defined in Linear.V2 Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V2 a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V2 a] -> ShowS | |
| MonadZip V2 | |
| Apply V2 | |
| Bind V2 | |
| Distributive V2 | |
| Hashable1 V2 | |
Defined in Linear.V2 Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> V2 a -> Int | |
| Serial1 V2 | |
Defined in Linear.V2 Methods serializeWith :: MonadPut m => (a -> m ()) -> V2 a -> m () deserializeWith :: MonadGet m => m a -> m (V2 a) | |
| Foldable1 V2 | |
| Traversable1 V2 | |
| Num r => Coalgebra r (E V2) | |
| Unbox a => Vector Vector (V2 a) | |
Defined in Linear.V2 Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> m (Vector (V2 a)) Source # basicUnsafeThaw :: PrimMonad m => Vector (V2 a) -> m (Mutable Vector (PrimState m) (V2 a)) Source # basicLength :: Vector (V2 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> Vector (V2 a) -> Vector (V2 a) Source # basicUnsafeIndexM :: Monad m => Vector (V2 a) -> Int -> m (V2 a) Source # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> Vector (V2 a) -> m () Source # | |
| Unbox a => MVector MVector (V2 a) | |
Defined in Linear.V2 Methods basicLength :: MVector s (V2 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> MVector s (V2 a) -> MVector s (V2 a) Source # basicOverlaps :: MVector s (V2 a) -> MVector s (V2 a) -> Bool Source # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V2 a)) Source # basicInitialize :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () Source # basicUnsafeReplicate :: PrimMonad m => Int -> V2 a -> m (MVector (PrimState m) (V2 a)) Source # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (V2 a) Source # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> V2 a -> m () Source # basicClear :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () Source # basicSet :: PrimMonad m => MVector (PrimState m) (V2 a) -> V2 a -> m () Source # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () Source # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () Source # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (MVector (PrimState m) (V2 a)) Source # | |
| Bounded a => Bounded (V2 a) | |
| Eq a => Eq (V2 a) | |
| Floating a => Floating (V2 a) | |
| Fractional a => Fractional (V2 a) | |
| Data a => Data (V2 a) | |
Defined in Linear.V2 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) 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 :: forall r r'. (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) | |
| Ord a => Ord (V2 a) | |
| Read a => Read (V2 a) | |
| Show a => Show (V2 a) | |
| Ix a => Ix (V2 a) | |
| Generic (V2 a) | |
| Lift a => Lift (V2 a) | |
| Epsilon a => Epsilon (V2 a) | |
| Unbox a => Unbox (V2 a) | |
Defined in Linear.V2 | |
| Storable a => Storable (V2 a) | |
Defined in Linear.V2 Methods 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 () | |
| Binary a => Binary (V2 a) | |
| NFData a => NFData (V2 a) | |
| Hashable a => Hashable (V2 a) | |
Defined in Linear.V2 | |
| Ixed (V2 a) | |
| Serial a => Serial (V2 a) | |
Defined in Linear.V2 | |
| Serialize a => Serialize (V2 a) | |
| Generic1 V2 | |
| FoldableWithIndex (E V2) V2 | |
Defined in Linear.V2 | |
| FunctorWithIndex (E V2) V2 | |
| TraversableWithIndex (E V2) V2 | |
| Each (V2 a) (V2 b) a b | |
| Field1 (V2 a) (V2 a) a a | |
| Field2 (V2 a) (V2 a) a a | |
| type Diff V2 | |
Defined in Linear.Affine | |
| type Size V2 | |
| type Rep V2 | |
| data MVector s (V2 a) | |
| type Rep (V2 a) | |
Defined in Linear.V2 type Rep (V2 a) = D1 ('MetaData "V2" "Linear.V2" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) | |
| data Vector (V2 a) | |
| type Index (V2 a) | |
| type IxValue (V2 a) | |
| type Rep1 V2 | |
Defined in Linear.V2 type Rep1 V2 = D1 ('MetaData "V2" "Linear.V2" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1)) | |
A 3-dimensional vector
Constructors
| V3 !a !a !a |
Instances
| Monad V3 | |
| Functor V3 | |
| MonadFix V3 | |
| Applicative V3 | |
| Foldable V3 | |
Defined in Linear.V3 Methods foldMap :: Monoid m => (a -> m) -> V3 a -> 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 | |
| Traversable V3 | |
| Representable V3 | |
| Affine V3 | |
| Trace V3 | |
| R3 V3 | |
| R2 V3 | |
| R1 V3 | |
| Finite V3 | |
| Metric V3 | |
| Additive V3 | |
Defined in Linear.V3 | |
| Eq1 V3 | |
| Ord1 V3 | |
Defined in Linear.V3 Methods liftCompare :: (a -> b -> Ordering) -> V3 a -> V3 b -> Ordering | |
| Read1 V3 | |
Defined in Linear.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 | |
Defined in Linear.V3 Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V3 a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V3 a] -> ShowS | |
| MonadZip V3 | |
| Apply V3 | |
| Bind V3 | |
| Distributive V3 | |
| Hashable1 V3 | |
Defined in Linear.V3 Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> V3 a -> Int | |
| Serial1 V3 | |
Defined in Linear.V3 Methods serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () deserializeWith :: MonadGet m => m a -> m (V3 a) | |
| Foldable1 V3 | |
| Traversable1 V3 | |
| Num r => Coalgebra r (E V3) | |
| Unbox a => Vector Vector (V3 a) | |
Defined in Linear.V3 Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> m (Vector (V3 a)) Source # basicUnsafeThaw :: PrimMonad m => Vector (V3 a) -> m (Mutable Vector (PrimState m) (V3 a)) Source # basicLength :: Vector (V3 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) Source # basicUnsafeIndexM :: Monad m => Vector (V3 a) -> Int -> m (V3 a) Source # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> Vector (V3 a) -> m () Source # | |
| Unbox a => MVector MVector (V3 a) | |
Defined in Linear.V3 Methods basicLength :: MVector s (V3 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) Source # basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool Source # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V3 a)) Source # basicInitialize :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () Source # basicUnsafeReplicate :: PrimMonad m => Int -> V3 a -> m (MVector (PrimState m) (V3 a)) Source # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (V3 a) Source # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> V3 a -> m () Source # basicClear :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () Source # basicSet :: PrimMonad m => MVector (PrimState m) (V3 a) -> V3 a -> m () Source # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () Source # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () Source # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (MVector (PrimState m) (V3 a)) Source # | |
| Bounded a => Bounded (V3 a) | |
| Eq a => Eq (V3 a) | |
| Floating a => Floating (V3 a) | |
| Fractional a => Fractional (V3 a) | |
| Data a => Data (V3 a) | |
Defined in Linear.V3 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) 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 :: forall r r'. (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) | |
| Ord a => Ord (V3 a) | |
| Read a => Read (V3 a) | |
| Show a => Show (V3 a) | |
| Ix a => Ix (V3 a) | |
| Generic (V3 a) | |
| Lift a => Lift (V3 a) | |
| Epsilon a => Epsilon (V3 a) | |
| Unbox a => Unbox (V3 a) | |
Defined in Linear.V3 | |
| Storable a => Storable (V3 a) | |
Defined in Linear.V3 Methods 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 () | |
| Binary a => Binary (V3 a) | |
| NFData a => NFData (V3 a) | |
| Hashable a => Hashable (V3 a) | |
Defined in Linear.V3 | |
| Ixed (V3 a) | |
| Serial a => Serial (V3 a) | |
Defined in Linear.V3 | |
| Serialize a => Serialize (V3 a) | |
| Generic1 V3 | |
| FoldableWithIndex (E V3) V3 | |
Defined in Linear.V3 | |
| FunctorWithIndex (E V3) V3 | |
| TraversableWithIndex (E V3) V3 | |
| Each (V3 a) (V3 b) a b | |
| Field1 (V3 a) (V3 a) a a | |
| Field2 (V3 a) (V3 a) a a | |
| Field3 (V3 a) (V3 a) a a | |
| type Diff V3 | |
Defined in Linear.Affine | |
| type Size V3 | |
| type Rep V3 | |
| data MVector s (V3 a) | |
| type Rep (V3 a) | |
Defined in Linear.V3 type Rep (V3 a) = D1 ('MetaData "V3" "Linear.V3" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))) | |
| data Vector (V3 a) | |
| type Index (V3 a) | |
| type IxValue (V3 a) | |
| type Rep1 V3 | |
Defined in Linear.V3 type Rep1 V3 = D1 ('MetaData "V3" "Linear.V3" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))) | |
A 4-dimensional vector.
Constructors
| V4 !a !a !a !a |
Instances
| Monad V4 | |
| Functor V4 | |
| MonadFix V4 | |
| Applicative V4 | |
| Foldable V4 | |
Defined in Linear.V4 Methods foldMap :: Monoid m => (a -> m) -> V4 a -> 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 | |
| Traversable V4 | |
| Representable V4 | |
| Affine V4 | |
| Trace V4 | |
| R4 V4 | |
| R3 V4 | |
| R2 V4 | |
| R1 V4 | |
| Finite V4 | |
| Metric V4 | |
| Additive V4 | |
Defined in Linear.V4 | |
| Eq1 V4 | |
| Ord1 V4 | |
Defined in Linear.V4 Methods liftCompare :: (a -> b -> Ordering) -> V4 a -> V4 b -> Ordering | |
| Read1 V4 | |
Defined in Linear.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 | |
Defined in Linear.V4 Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V4 a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V4 a] -> ShowS | |
| MonadZip V4 | |
| Apply V4 | |
| Bind V4 | |
| Distributive V4 | |
| Hashable1 V4 | |
Defined in Linear.V4 Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> V4 a -> Int | |
| Serial1 V4 | |
Defined in Linear.V4 Methods serializeWith :: MonadPut m => (a -> m ()) -> V4 a -> m () deserializeWith :: MonadGet m => m a -> m (V4 a) | |
| Foldable1 V4 | |
| Traversable1 V4 | |
| Num r => Coalgebra r (E V4) | |
| Unbox a => Vector Vector (V4 a) | |
Defined in Linear.V4 Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> m (Vector (V4 a)) Source # basicUnsafeThaw :: PrimMonad m => Vector (V4 a) -> m (Mutable Vector (PrimState m) (V4 a)) Source # basicLength :: Vector (V4 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> Vector (V4 a) -> Vector (V4 a) Source # basicUnsafeIndexM :: Monad m => Vector (V4 a) -> Int -> m (V4 a) Source # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> Vector (V4 a) -> m () Source # | |
| Unbox a => MVector MVector (V4 a) | |
Defined in Linear.V4 Methods basicLength :: MVector s (V4 a) -> Int Source # basicUnsafeSlice :: Int -> Int -> MVector s (V4 a) -> MVector s (V4 a) Source # basicOverlaps :: MVector s (V4 a) -> MVector s (V4 a) -> Bool Source # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V4 a)) Source # basicInitialize :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () Source # basicUnsafeReplicate :: PrimMonad m => Int -> V4 a -> m (MVector (PrimState m) (V4 a)) Source # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (V4 a) Source # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> V4 a -> m () Source # basicClear :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () Source # basicSet :: PrimMonad m => MVector (PrimState m) (V4 a) -> V4 a -> m () Source # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () Source # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () Source # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (MVector (PrimState m) (V4 a)) Source # | |
| Bounded a => Bounded (V4 a) | |
| Eq a => Eq (V4 a) | |
| Floating a => Floating (V4 a) | |
| Fractional a => Fractional (V4 a) | |
| Data a => Data (V4 a) | |
Defined in Linear.V4 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) 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 :: forall r r'. (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) | |
| Ord a => Ord (V4 a) | |
| Read a => Read (V4 a) | |
| Show a => Show (V4 a) | |
| Ix a => Ix (V4 a) | |
| Generic (V4 a) | |
| Lift a => Lift (V4 a) | |
| Epsilon a => Epsilon (V4 a) | |
| Unbox a => Unbox (V4 a) | |
Defined in Linear.V4 | |
| Storable a => Storable (V4 a) | |
Defined in Linear.V4 Methods 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 () | |
| Binary a => Binary (V4 a) | |
| NFData a => NFData (V4 a) | |
| Hashable a => Hashable (V4 a) | |
Defined in Linear.V4 | |
| Ixed (V4 a) | |
| Serial a => Serial (V4 a) | |
Defined in Linear.V4 | |
| Serialize a => Serialize (V4 a) | |
| Generic1 V4 | |
| FoldableWithIndex (E V4) V4 | |
Defined in Linear.V4 | |
| FunctorWithIndex (E V4) V4 | |
| TraversableWithIndex (E V4) V4 | |
| Each (V4 a) (V4 b) a b | |
| Field1 (V4 a) (V4 a) a a | |
| Field2 (V4 a) (V4 a) a a | |
| Field3 (V4 a) (V4 a) a a | |
| Field4 (V4 a) (V4 a) a a | |
| type Diff V4 | |
Defined in Linear.Affine | |
| type Size V4 | |
| type Rep V4 | |
| data MVector s (V4 a) | |
| type Rep (V4 a) | |
Defined in Linear.V4 type Rep (V4 a) = D1 ('MetaData "V4" "Linear.V4" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V4" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))) | |
| data Vector (V4 a) | |
| type Index (V4 a) | |
| type IxValue (V4 a) | |
| type Rep1 V4 | |
Defined in Linear.V4 type Rep1 V4 = D1 ('MetaData "V4" "Linear.V4" "linear-1.20.9-RPUBINYq384VPzdgkhYOj" 'False) (C1 ('MetaCons "V4" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))) | |