summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal/Matrix.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 2925fc0..32dc603 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -194,7 +194,9 @@ multiplyD order a b
194 194
195---------------------------------------------------------------------- 195----------------------------------------------------------------------
196 196
197outer u v = dat (multiply RowMajor r c) 197outer' u v = dat (outer u v)
198
199outer u v = multiply RowMajor r c
198 where r = matrixFromVector RowMajor 1 u 200 where r = matrixFromVector RowMajor 1 u
199 c = matrixFromVector RowMajor (dim v) v 201 c = matrixFromVector RowMajor (dim v) v
200 202
@@ -212,8 +214,7 @@ subMatrixR (r0,c0) (rt,ct) x = unsafePerformIO $ do
212 r <- createMatrix RowMajor rt ct 214 r <- createMatrix RowMajor rt ct
213 c_submatrixR r0 (r0+rt-1) c0 (c0+ct-1) // mat cdat x // mat cdat r // check "subMatrixR" [dat r] 215 c_submatrixR r0 (r0+rt-1) c0 (c0+ct-1) // mat cdat x // mat cdat r // check "subMatrixR" [dat r]
214 return r 216 return r
215foreign import ccall "aux.h submatrixR" 217foreign import ccall "aux.h submatrixR" c_submatrixR :: Int -> Int -> Int -> Int -> TMM
216 c_submatrixR :: Int -> Int -> Int -> Int -> TMM
217 218
218-- | extraction of a submatrix of a complex matrix 219-- | extraction of a submatrix of a complex matrix
219subMatrixC :: (Int,Int) -- ^ (r0,c0) starting position 220subMatrixC :: (Int,Int) -- ^ (r0,c0) starting position