diff options
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 13 | ||||
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 1 |
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 | ||
229 | instance Element Double where | 232 | instance 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 | ||
234 | instance Element (Complex Double) where | 236 | instance 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 | -} |
172 | join :: Storable t => [Vector t] -> Vector t | 172 | join :: Storable t => [Vector t] -> Vector t |
173 | join [] = error "joining zero vectors" | 173 | join [] = error "joining zero vectors" |
174 | join [v] = v | ||
174 | join as = unsafePerformIO $ do | 175 | join 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 |