Safe Haskell | Safe-Infered |
---|
This module provides wrappers for CvMat type. This is still preliminary as the type of the matrix isn't coded in the haskell type.
- class Exists a where
- data Matrix a
- emptyMatrix :: Exists (Matrix a) => Args (Matrix a) -> Matrix a
- fromFunction :: (Storable t, Exists (Matrix t), Args (Matrix t) ~ (Int, Int)) => (Int, Int) -> ((Int, Int) -> t) -> Matrix t
- fromList :: forall t. (Storable t, Exists (Matrix t), Args (Matrix t) ~ (Int, Int)) => (Int, Int) -> [t] -> Matrix t
- toList :: Storable a => Matrix a -> [a]
- toRows :: forall t. Storable t => Matrix t -> [[t]]
- toCols :: forall t. Storable t => Matrix t -> [[t]]
- get :: forall t. Storable t => Matrix t -> Int -> Int -> IO t
- put :: forall t. Storable t => Matrix t -> Int -> Int -> t -> IO ()
- withMatPtr :: Matrix x -> (Ptr C'CvMat -> IO a) -> IO a
- transpose :: (Exists (Matrix a), Args (Matrix a) ~ Size (Matrix a)) => Matrix a -> Matrix a
- mxm :: (Exists (Matrix a), Args (Matrix a) ~ Size (Matrix a)) => Matrix a -> Matrix a -> Matrix a
- rodrigues2 :: (Exists (Matrix a), Args (Matrix a) ~ Size (Matrix a)) => Matrix a -> Matrix a
Documentation
data Matrix a
(Show t, Storable t, ~ * (Size (Matrix t)) (Int, Int)) => Show (Matrix t) | |
Sized (Matrix a) | |
Exists (Matrix Double) | |
Exists (Matrix Float) | |
Exists (Matrix Int) | |
Exists (Matrix (Float, Float)) | |
Exists (Matrix (Int, Int)) | |
Exists (Matrix (CFloat, CFloat)) | |
Exists (Matrix (Float, Float, Float)) | |
Exists (Matrix (Int, Int, Int, Int)) | |
Exists (Matrix (CInt, CInt, CInt, CInt)) |
emptyMatrix :: Exists (Matrix a) => Args (Matrix a) -> Matrix a
Create an empty matrix of given dimensions
fromFunction :: (Storable t, Exists (Matrix t), Args (Matrix t) ~ (Int, Int)) => (Int, Int) -> ((Int, Int) -> t) -> Matrix t
Generate a matrix from a index function
fromList :: forall t. (Storable t, Exists (Matrix t), Args (Matrix t) ~ (Int, Int)) => (Int, Int) -> [t] -> Matrix t
toRows :: forall t. Storable t => Matrix t -> [[t]]
Convert matrix to rows represented as nested lists
toCols :: forall t. Storable t => Matrix t -> [[t]]
Convert matrix to cols represented as nested lists
withMatPtr :: Matrix x -> (Ptr C'CvMat -> IO a) -> IO a
transpose :: (Exists (Matrix a), Args (Matrix a) ~ Size (Matrix a)) => Matrix a -> Matrix a
Transpose a matrix. Does not do complex conjugation for complex matrices