Copyright | (c) Alberto Ruiz 2013 |
---|---|
License | GPL |
Maintainer | Alberto Ruiz (aruiz at um dot es) |
Stability | provisional |
Safe Haskell | None |
Language | Haskell98 |
- size :: Matrix t -> (Int, Int)
- disp :: Int -> Matrix Double -> IO ()
- zeros :: Int -> Int -> Matrix Double
- ones :: Int -> Int -> Matrix Double
- diagl :: [Double] -> Matrix Double
- row :: [Double] -> Matrix Double
- col :: [Double] -> Matrix Double
- (&) :: Vector Double -> Vector Double -> Vector Double
- (!) :: Matrix Double -> Matrix Double -> Matrix Double
- (¦) :: Matrix Double -> Matrix Double -> Matrix Double
- (#) :: Matrix Double -> Matrix Double -> Matrix Double
- (?) :: Element t => Matrix t -> [Int] -> Matrix t
- ¿ :: Element t => Matrix t -> [Int] -> Matrix t
- rand :: Int -> Int -> IO (Matrix Double)
- randn :: Int -> Int -> IO (Matrix Double)
- cross :: Vector Double -> Vector Double -> Vector Double
- norm :: Vector Double -> Double
- unitary :: Vector Double -> Vector Double
- mt :: Matrix Double -> Matrix Double
- pairwiseD2 :: Matrix Double -> Matrix Double -> Matrix Double
- rowOuters :: Matrix Double -> Matrix Double -> Matrix Double
- null1 :: Matrix Double -> Vector Double
- null1sym :: Matrix Double -> Vector Double
- corr :: Product t => Vector t -> Vector t -> Vector t
- conv :: (Product t, Num t) => Vector t -> Vector t -> Vector t
- corrMin :: (Container Vector t, RealElement t, Product t) => Vector t -> Vector t -> Vector t
- corr2 :: Product a => Matrix a -> Matrix a -> Matrix a
- conv2 :: (Num a, Product a) => Matrix a -> Matrix a -> Matrix a
- separable :: Element t => (Vector t -> Vector t) -> Matrix t -> Matrix t
- vec :: Element t => Matrix t -> Vector t
- vech :: Element t => Matrix t -> Vector t
- dup :: (Num t, Num (Vector t), Element t) => Int -> Matrix t
- vtrans :: Element t => Int -> Matrix t -> Matrix t
Convenience functions
disp :: Int -> Matrix Double -> IO () Source
show a matrix with given number of digits after the decimal point
(!) :: Matrix Double -> Matrix Double -> Matrix Double infixl 3 Source
horizontal concatenation of real matrices
(¦) :: Matrix Double -> Matrix Double -> Matrix Double infixl 3 Source
(00A6) horizontal concatenation of real matrices
(#) :: Matrix Double -> Matrix Double -> Matrix Double infixl 2 Source
vertical concatenation of real matrices
rand :: Int -> Int -> IO (Matrix Double) Source
pseudorandom matrix with uniform elements between 0 and 1
cross :: Vector Double -> Vector Double -> Vector Double Source
cross product (for three-element real vectors)
unitary :: Vector Double -> Vector Double Source
Obtains a vector in the same direction with 2-norm=1
pairwiseD2 :: Matrix Double -> Matrix Double -> Matrix Double Source
Matrix of pairwise squared distances of row vectors (using the matrix product trick in blog.smola.org)
null1sym :: Matrix Double -> Vector Double Source
solution of overconstrained homogeneous symmetric linear system
Convolution
1D
correlation
>>>
corr (fromList[1,2,3]) (fromList [1..10])
fromList [14.0,20.0,26.0,32.0,38.0,44.0,50.0,56.0]
conv :: (Product t, Num t) => Vector t -> Vector t -> Vector t Source
convolution (corr
with reversed kernel and padded input, equivalent to polynomial product)
>>>
conv (fromList[1,1]) (fromList [-1,1])
fromList [-1.0,0.0,1.0]
corrMin :: (Container Vector t, RealElement t, Product t) => Vector t -> Vector t -> Vector t Source
2D
separable :: Element t => (Vector t -> Vector t) -> Matrix t -> Matrix t Source
matrix computation implemented as separated vector operations by rows and columns.
Tools for the Kronecker product
(see A. Fusiello, A matter of notation: Several uses of the Kronecker product in 3d computer vision, Pattern Recognition Letters 28 (15) (2007) 2127-2132)