Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
type-indexed matrices.
Synopsis
- newtype Matrix n m r = Matrix (Vector n (Vector m r))
- identityMatrix :: (Arity d, Num r) => Matrix d d r
- multM :: (Arity r, Arity c, Arity c', Num a) => Matrix r c a -> Matrix c c' a -> Matrix r c' a
- mult :: (Arity m, Arity n, Num r) => Matrix n m r -> Vector m r -> Vector n r
- class Invertible n r where
- class Arity d => HasDeterminant d where
Documentation
a matrix of n rows, each of m columns, storing values of type r
Instances
(Arity n, Arity m) => Functor (Matrix n m) Source # | |
(Arity n, Arity m) => Foldable (Matrix n m) Source # | |
Defined in Data.Geometry.Matrix fold :: Monoid m0 => Matrix n m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Matrix n m a -> m0 # foldr :: (a -> b -> b) -> b -> Matrix n m a -> b # foldr' :: (a -> b -> b) -> b -> Matrix n m a -> b # foldl :: (b -> a -> b) -> b -> Matrix n m a -> b # foldl' :: (b -> a -> b) -> b -> Matrix n m a -> b # foldr1 :: (a -> a -> a) -> Matrix n m a -> a # foldl1 :: (a -> a -> a) -> Matrix n m a -> a # toList :: Matrix n m a -> [a] # null :: Matrix n m a -> Bool # length :: Matrix n m a -> Int # elem :: Eq a => a -> Matrix n m a -> Bool # maximum :: Ord a => Matrix n m a -> a # minimum :: Ord a => Matrix n m a -> a # | |
(Arity n, Arity m) => Traversable (Matrix n m) Source # | |
Defined in Data.Geometry.Matrix | |
(Eq r, Arity n, Arity m) => Eq (Matrix n m r) Source # | |
(Ord r, Arity n, Arity m) => Ord (Matrix n m r) Source # | |
Defined in Data.Geometry.Matrix | |
(Show r, Arity n, Arity m) => Show (Matrix n m r) Source # | |
multM :: (Arity r, Arity c, Arity c', Num a) => Matrix r c a -> Matrix c c' a -> Matrix r c' a Source #
class Invertible n r where Source #
Instances
Fractional r => Invertible 2 r Source # | |
Fractional r => Invertible 3 r Source # | |
Fractional r => Invertible 4 r Source # | |
class Arity d => HasDeterminant d where Source #
Instances
HasDeterminant 1 Source # | |
HasDeterminant 2 Source # | |
HasDeterminant 3 Source # | |
HasDeterminant 4 Source # | |