| Copyright | (C) 2012-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <[email protected]> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Linear.V3
Description
3-D Vectors
Synopsis
- data V3 a = V3 !a !a !a
- cross :: Num a => V3 a -> V3 a -> V3 a
- triple :: Num a => V3 a -> V3 a -> V3 a -> a
- class R1 t where
- class R1 t => R2 t where
- _yx :: R2 t => Lens' (t a) (V2 a)
- class R2 t => R3 t where
- _xz :: R3 t => Lens' (t a) (V2 a)
- _yz :: R3 t => Lens' (t a) (V2 a)
- _zx :: R3 t => Lens' (t a) (V2 a)
- _zy :: R3 t => Lens' (t a) (V2 a)
- _xzy :: R3 t => Lens' (t a) (V3 a)
- _yxz :: R3 t => Lens' (t a) (V3 a)
- _yzx :: R3 t => Lens' (t a) (V3 a)
- _zxy :: R3 t => Lens' (t a) (V3 a)
- _zyx :: R3 t => Lens' (t a) (V3 a)
- ex :: R1 t => E t
- ey :: R2 t => E t
- ez :: R3 t => E t
Documentation
A 3-dimensional vector
Constructors
| V3 !a !a !a |
Instances
| Representable V3 Source # | |
| MonadFix V3 Source # | |
| MonadZip V3 Source # | |
| Foldable V3 Source # | |
Defined in Linear.V3 Methods fold :: Monoid m => V3 m -> m # 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 # elem :: Eq a => a -> V3 a -> Bool # maximum :: Ord a => V3 a -> a # | |
| Foldable1 V3 Source # | |
Defined in Linear.V3 Methods fold1 :: Semigroup m => V3 m -> m # foldMap1 :: Semigroup m => (a -> m) -> V3 a -> m # foldMap1' :: Semigroup m => (a -> m) -> V3 a -> m # toNonEmpty :: V3 a -> NonEmpty a # maximum :: Ord a => V3 a -> a # minimum :: Ord a => V3 a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> V3 a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> V3 a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> V3 a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> V3 a -> b # | |
| Eq1 V3 Source # | |
| Ord1 V3 Source # | |
| Read1 V3 Source # | |
| Show1 V3 Source # | |
| Traversable V3 Source # | |
| Applicative V3 Source # | |
| Functor V3 Source # | |
| Monad V3 Source # | |
| Serial1 V3 Source # | |
Defined in Linear.V3 Methods serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () # deserializeWith :: MonadGet m => m a -> m (V3 a) # | |
| Distributive V3 Source # | |
| Hashable1 V3 Source # | |
| Affine V3 Source # | |
| Metric V3 Source # | |
| Trace V3 Source # | |
| Finite V3 Source # | |
| R1 V3 Source # | |
| R2 V3 Source # | |
| R3 V3 Source # | |
| Additive V3 Source # | |
Defined in Linear.V3 | |
| Apply V3 Source # | |
| Bind V3 Source # | |
| Traversable1 V3 Source # | |
| Generic1 V3 Source # | |
| Num r => Coalgebra r (E V3) Source # | |
| Lift a => Lift (V3 a :: Type) Source # | |
| Unbox a => Vector Vector (V3 a) Source # | |
Defined in Linear.V3 Methods basicUnsafeFreeze :: Mutable Vector s (V3 a) -> ST s (Vector (V3 a)) basicUnsafeThaw :: Vector (V3 a) -> ST s (Mutable Vector s (V3 a)) basicLength :: Vector (V3 a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) basicUnsafeIndexM :: Vector (V3 a) -> Int -> Box (V3 a) basicUnsafeCopy :: Mutable Vector s (V3 a) -> Vector (V3 a) -> ST s () | |
| Unbox a => MVector MVector (V3 a) Source # | |
Defined in Linear.V3 Methods basicLength :: MVector s (V3 a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool basicUnsafeNew :: Int -> ST s (MVector s (V3 a)) basicInitialize :: MVector s (V3 a) -> ST s () basicUnsafeReplicate :: Int -> V3 a -> ST s (MVector s (V3 a)) basicUnsafeRead :: MVector s (V3 a) -> Int -> ST s (V3 a) basicUnsafeWrite :: MVector s (V3 a) -> Int -> V3 a -> ST s () basicClear :: MVector s (V3 a) -> ST s () basicSet :: MVector s (V3 a) -> V3 a -> ST s () basicUnsafeCopy :: MVector s (V3 a) -> MVector s (V3 a) -> ST s () basicUnsafeMove :: MVector s (V3 a) -> MVector s (V3 a) -> ST s () basicUnsafeGrow :: MVector s (V3 a) -> Int -> ST s (MVector s (V3 a)) | |
| Data a => Data (V3 a) Source # | |
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) # | |
| Storable a => Storable (V3 a) Source # | |
| Monoid a => Monoid (V3 a) Source # | |
| Semigroup a => Semigroup (V3 a) Source # | |
| Bounded a => Bounded (V3 a) Source # | |
| Floating a => Floating (V3 a) Source # | |
| Generic (V3 a) Source # | |
| Ix a => Ix (V3 a) Source # | |
| Num a => Num (V3 a) Source # | |
| Read a => Read (V3 a) Source # | |
| Fractional a => Fractional (V3 a) Source # | |
| Show a => Show (V3 a) Source # | |
| Binary a => Binary (V3 a) Source # | |
| Serial a => Serial (V3 a) Source # | |
| Serialize a => Serialize (V3 a) Source # | |
| NFData a => NFData (V3 a) Source # | |
| Eq a => Eq (V3 a) Source # | |
| Ord a => Ord (V3 a) Source # | |
| Hashable a => Hashable (V3 a) Source # | |
| Ixed (V3 a) Source # | |
| Epsilon a => Epsilon (V3 a) Source # | |
| Random a => Random (V3 a) Source # | |
| Uniform a => Uniform (V3 a) Source # | |
Defined in Linear.V3 Methods uniformM :: StatefulGen g m => g -> m (V3 a) # | |
| UniformRange a => UniformRange (V3 a) Source # | |
| Unbox a => Unbox (V3 a) Source # | |
Defined in Linear.V3 | |
| FoldableWithIndex (E V3) V3 Source # | |
| FunctorWithIndex (E V3) V3 Source # | |
| TraversableWithIndex (E V3) V3 Source # | |
| Each (V3 a) (V3 b) a b Source # | |
| Field1 (V3 a) (V3 a) a a Source # | |
| Field2 (V3 a) (V3 a) a a Source # | |
| Field3 (V3 a) (V3 a) a a Source # | |
| type Rep V3 Source # | |
| type Diff V3 Source # | |
Defined in Linear.Affine | |
| type Size V3 Source # | |
| type Rep1 V3 Source # | |
Defined in Linear.V3 type Rep1 V3 = D1 ('MetaData "V3" "Linear.V3" "linear-1.23.1-3KxQuVTaEbf7IVom2f7XaL" '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))) | |
| data MVector s (V3 a) Source # | |
| type Rep (V3 a) Source # | |
Defined in Linear.V3 type Rep (V3 a) = D1 ('MetaData "V3" "Linear.V3" "linear-1.23.1-3KxQuVTaEbf7IVom2f7XaL" '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)))) | |
| type Index (V3 a) Source # | |
| type IxValue (V3 a) Source # | |
| data Vector (V3 a) Source # | |
A space that has at least 1 basis vector _x.
class R1 t => R2 t where Source #
Minimal complete definition
Methods
>>>V2 1 2 ^._y2
>>>V2 1 2 & _y .~ 3V2 1 3