summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs13
-rw-r--r--lib/Data/Packed/Internal/Vector.hs1
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 68547bd..9dc90af 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -223,18 +223,19 @@ class (Storable a, Floating a) => Element a where
223 subMatrixD :: (Int,Int) -- ^ (r0,c0) starting position 223 subMatrixD :: (Int,Int) -- ^ (r0,c0) starting position
224 -> (Int,Int) -- ^ (rt,ct) dimensions of submatrix 224 -> (Int,Int) -- ^ (rt,ct) dimensions of submatrix
225 -> Matrix a -> Matrix a 225 -> Matrix a -> Matrix a
226 subMatrixD = subMatrix'
226 transdata :: Int -> Vector a -> Int -> Vector a 227 transdata :: Int -> Vector a -> Int -> Vector a
228 transdata = transdata'
227 constantD :: a -> Int -> Vector a 229 constantD :: a -> Int -> Vector a
230 constantD = constant'
228 231
229instance Element Double where 232instance Element Double where
230 subMatrixD = subMatrix' 233 transdata = transdataAux ctransR
231 transdata = transdataAux ctransR -- transdata' 234 constantD = constantAux cconstantR
232 constantD = constantAux cconstantR -- constant'
233 235
234instance Element (Complex Double) where 236instance Element (Complex Double) where
235 subMatrixD = subMatrix' 237 transdata = transdataAux ctransC
236 transdata = transdataAux ctransC -- transdata' 238 constantD = constantAux cconstantC
237 constantD = constantAux cconstantC -- constant'
238 239
239------------------------------------------------------------------- 240-------------------------------------------------------------------
240 241
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs
index 5784861..ac0f176 100644
--- a/lib/Data/Packed/Internal/Vector.hs
+++ b/lib/Data/Packed/Internal/Vector.hs
@@ -171,6 +171,7 @@ infixl 9 @>
171-} 171-}
172join :: Storable t => [Vector t] -> Vector t 172join :: Storable t => [Vector t] -> Vector t
173join [] = error "joining zero vectors" 173join [] = error "joining zero vectors"
174join [v] = v
174join as = unsafePerformIO $ do 175join as = unsafePerformIO $ do
175 let tot = sum (map dim as) 176 let tot = sum (map dim as)
176 r@V {fptr = p} <- createVector tot 177 r@V {fptr = p} <- createVector tot