summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Data.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Data.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Data.hs59
1 files changed, 36 insertions, 23 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Data.hs b/packages/base/src/Numeric/LinearAlgebra/Data.hs
index 8a0b9a2..2aac2e4 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Data.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Data.hs
@@ -1,7 +1,7 @@
1-------------------------------------------------------------------------------- 1--------------------------------------------------------------------------------
2{- | 2{- |
3Module : Numeric.LinearAlgebra.Data 3Module : Numeric.LinearAlgebra.Data
4Copyright : (c) Alberto Ruiz 2014 4Copyright : (c) Alberto Ruiz 2015
5License : BSD3 5License : BSD3
6Maintainer : Alberto Ruiz 6Maintainer : Alberto Ruiz
7Stability : provisional 7Stability : provisional
@@ -15,62 +15,76 @@ module Numeric.LinearAlgebra.Data(
15 15
16 -- * Vector 16 -- * Vector
17 -- | 1D arrays are storable vectors from the vector package. 17 -- | 1D arrays are storable vectors from the vector package.
18 18
19 vector, (|>), 19 vector, (|>),
20 20
21 -- * Matrix 21 -- * Matrix
22 22
23 matrix, (><), tr, 23 matrix, (><), tr, tr',
24 24
25 -- * Dimensions
26
27 size, rows, cols,
28
29 -- * conversion from\/to lists
30 fromList, toList,
31 fromLists, toLists,
32 row, col,
33
34 -- * conversions vector\/matrix
35
36 flatten, reshape, asRow, asColumn,
37 fromRows, toRows, fromColumns, toColumns,
38
25 -- * Indexing 39 -- * Indexing
26 40
27 size, 41 atIndex,
28 Indexable(..), 42 Indexable(..),
29 43
30 -- * Construction 44 -- * Construction
31 scalar, Konst(..), Build(..), assoc, accum, linspace, range, idxs, -- ones, zeros, 45 scalar, Konst(..), Build(..), assoc, accum, linspace, range, idxs, -- ones, zeros,
32 46
33 -- * Diagonal 47 -- * Diagonal
34 ident, diag, diagl, diagRect, takeDiag, 48 ident, diag, diagl, diagRect, takeDiag,
35 49
36 -- * Data manipulation 50 -- * Vector extraction
37 fromList, toList, subVector, takesV, vjoin, 51 subVector, takesV, vjoin,
38 flatten, reshape, asRow, asColumn, row, col, 52
39 fromRows, toRows, fromColumns, toColumns, fromLists, toLists, fromArray2D, 53 -- * Matrix extraction
40 Extractor(..), (??), 54 Extractor(..), (??),
41 takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud, 55 takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud,
42 56
57
43 -- * Block matrix 58 -- * Block matrix
44 fromBlocks, (|||), (===), diagBlock, repmat, toBlocks, toBlocksEvery, 59 fromBlocks, (|||), (===), diagBlock, repmat, toBlocks, toBlocksEvery,
45 60
46 -- * Mapping functions 61 -- * Mapping functions
47 conj, cmap, cmod, step, cond, 62 conj, cmap, cmod, step, cond,
48 63
49 -- * Find elements 64 -- * Find elements
50 find, maxIndex, minIndex, maxElement, minElement, atIndex, 65 find, maxIndex, minIndex, maxElement, minElement,
51 sortVector, 66 sortVector, sortIndex,
52 67
53 -- * Sparse 68 -- * Sparse
54 AssocMatrix, toDense, 69 AssocMatrix, toDense,
55 mkSparse, mkDiagR, mkDense, 70 mkSparse, mkDiagR, mkDense,
56 71
57 -- * IO 72 -- * IO
58 disp, 73 disp,
59 loadMatrix, loadMatrix', saveMatrix, 74 loadMatrix, loadMatrix', saveMatrix,
60 latexFormat, 75 latexFormat,
61 dispf, disps, dispcf, format, 76 dispf, disps, dispcf, format,
62 dispDots, dispBlanks, dispShort, 77 dispDots, dispBlanks, dispShort,
63-- * Conversion 78-- * Element conversion
64 Convert(..), 79 Convert(..),
65 roundVector, 80 roundVector,
66 fromInt, 81 fromInt,
67 -- * Misc 82 -- * Misc
68 arctan2, 83 arctan2,
69 rows, cols,
70 separable, 84 separable,
71 (¦),(——), 85 fromArray2D,
72 module Data.Complex, 86 module Data.Complex,
73 CInt, Idxs, 87 I,
74 Vector, Matrix, GMatrix, nRows, nCols 88 Vector, Matrix, GMatrix, nRows, nCols
75 89
76) where 90) where
@@ -81,7 +95,6 @@ import Data.Packed.Numeric
81import Numeric.LinearAlgebra.Util hiding ((&),(#)) 95import Numeric.LinearAlgebra.Util hiding ((&),(#))
82import Data.Complex 96import Data.Complex
83import Numeric.Sparse 97import Numeric.Sparse
84import Data.Packed.Internal.Vector(Idxs) 98import Data.Packed.Internal.Numeric(I,Extractor(..),(??),fromInt,range,idxs)
85import Data.Packed.Internal.Numeric(CInt,Extractor(..),(??),fromInt,range,idxs)
86 99
87 100