diff options
Diffstat (limited to 'packages/base/src/Internal/Matrix.hs')
-rw-r--r-- | packages/base/src/Internal/Matrix.hs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/packages/base/src/Internal/Matrix.hs b/packages/base/src/Internal/Matrix.hs index bdf2785..8597dcb 100644 --- a/packages/base/src/Internal/Matrix.hs +++ b/packages/base/src/Internal/Matrix.hs | |||
@@ -142,10 +142,9 @@ a # b = apply a b | |||
142 | 142 | ||
143 | -------------------------------------------------------------------------------- | 143 | -------------------------------------------------------------------------------- |
144 | 144 | ||
145 | extractAll ord m = unsafePerformIO $ | 145 | copy ord m = extractR ord m 0 (idxs[0,rows m-1]) 0 (idxs[0,cols m-1]) |
146 | extractR ord m | 146 | |
147 | 0 (idxs[0,rows m-1]) | 147 | extractAll ord m = unsafePerformIO (copy ord m) |
148 | 0 (idxs[0,cols m-1]) | ||
149 | 148 | ||
150 | {- | Creates a vector by concatenation of rows. If the matrix is ColumnMajor, this operation requires a transpose. | 149 | {- | Creates a vector by concatenation of rows. If the matrix is ColumnMajor, this operation requires a transpose. |
151 | 150 | ||
@@ -204,16 +203,6 @@ toRows m | |||
204 | sub k = subVector (k*xRow m) (cols m) (xdat m) | 203 | sub k = subVector (k*xRow m) (cols m) (xdat m) |
205 | ext k = xdat $ unsafePerformIO $ extractR RowMajor m 1 (idxs[k]) 0 (idxs[0,cols m-1]) | 204 | ext k = xdat $ unsafePerformIO $ extractR RowMajor m 1 (idxs[k]) 0 (idxs[0,cols m-1]) |
206 | 205 | ||
207 | {- | ||
208 | | c == 0 = replicate r (fromList[]) | ||
209 | | otherwise = toRows' 0 | ||
210 | where | ||
211 | v = flatten m | ||
212 | r = rows m | ||
213 | c = cols m | ||
214 | toRows' k | k == r*c = [] | ||
215 | | otherwise = subVector k c v : toRows' (k+c) | ||
216 | -} | ||
217 | 206 | ||
218 | -- | Creates a matrix from a list of vectors, as columns | 207 | -- | Creates a matrix from a list of vectors, as columns |
219 | fromColumns :: Element t => [Vector t] -> Matrix t | 208 | fromColumns :: Element t => [Vector t] -> Matrix t |