1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
{-# LANGUAGE TypeOperators #-}
--------------------------------------------------------------------------------
{- |
Module : Numeric.LinearAlgebra.Data
Copyright : (c) Alberto Ruiz 2015
License : BSD3
Maintainer : Alberto Ruiz
Stability : provisional
Basic data processing.
-}
--------------------------------------------------------------------------------
module Numeric.LinearAlgebra.Data(
-- * Vector
-- | 1D arrays are storable vectors from the vector package. There is no distinction
-- between row and column vectors.
fromList, toList, (|>), vector, range, idxs,
-- * Matrix
(><), matrix, tr, tr',
-- * Dimensions
size, rows, cols,
-- * Conversion from\/to lists
fromLists, toLists,
row, col,
-- * Conversions vector\/matrix
flatten, reshape, asRow, asColumn,
fromRows, toRows, fromColumns, toColumns,
-- * Indexing
atIndex,
Indexable(..),
-- * Construction
scalar, Konst(..), Build(..), assoc, accum, linspace, -- ones, zeros,
-- * Diagonal
ident, diag, diagl, diagRect, takeDiag,
-- * Vector extraction
subVector, takesV, vjoin,
-- * Matrix extraction
Extractor(..), (??),
takeRows, dropRows, takeColumns, dropColumns,
subMatrix, (?), (¿), fliprl, flipud,
remap,
-- * Block matrix
fromBlocks, (|||), (===), diagBlock, repmat, toBlocks, toBlocksEvery,
-- * Mapping functions
conj, cmap, cmod,
step, cond,
-- * Find elements
find, maxIndex, minIndex, maxElement, minElement,
sortVector, sortIndex,
-- * Sparse
AssocMatrix, toDense,
mkSparse, mkDiagR, mkDense,
-- * IO
disp,
loadMatrix, loadMatrix', saveMatrix,
latexFormat,
dispf, disps, dispcf, format,
dispDots, dispBlanks, dispShort,
-- * Element conversion
Convert(..),
roundVector,
fromInt,toInt,fromZ,toZ,
-- * Misc
arctan2,
separable,
fromArray2D,
module Data.Complex,
R,C,I,Z,Mod, type(./.),
Vector, Matrix, GMatrix, nRows, nCols
) where
import Internal.Vector
import Internal.Vectorized
import Internal.Matrix hiding (size)
import Internal.Element
import Internal.IO
import Internal.Numeric
import Internal.Container
import Internal.Util hiding ((&))
import Data.Complex
import Internal.Sparse
import Internal.Modular
|