summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Data.hs
blob: b40054cc384d2700587b0180ab1de34ea2f4ac74 (plain)
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
--------------------------------------------------------------------------------
{- |
Module      :  Numeric.LinearAlgebra.Data
Copyright   :  (c) Alberto Ruiz 2014
License     :  BSD3
Maintainer  :  Alberto Ruiz
Stability   :  provisional

Basic data processing.

-}
--------------------------------------------------------------------------------

module Numeric.LinearAlgebra.Data(

    -- * Vector
    -- | 1D arrays are storable vectors from the vector package.
    
    vector, (|>),

    -- * Matrix
    
    matrix, (><), tr,
    
    -- * Indexing
    
    size,
    Indexable(..),
    
    -- * Construction
    scalar, Konst(..), Build(..), assoc, accum, linspace, range,-- ones, zeros,

    -- * Diagonal
    ident, diag, diagl, diagRect, takeDiag,

    -- * Data manipulation
    fromList, toList, subVector, takesV, vjoin,
    flatten, reshape, asRow, asColumn, row, col,
    fromRows, toRows, fromColumns, toColumns, fromLists, toLists, fromArray2D,
    Extractor(..), (??),
    takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud,
  
    -- * Block matrix
    fromBlocks, (|||), (===), diagBlock, repmat, toBlocks, toBlocksEvery,

    -- * Mapping functions
    conj, cmap, cmod, step, cond,
    
    -- * Find elements
    find, maxIndex, minIndex, maxElement, minElement, atIndex,
    sortVector,

    -- * Sparse
    AssocMatrix, toDense,
    mkSparse, mkDiagR, mkDense,
    
    -- * IO
    disp,
    loadMatrix, loadMatrix', saveMatrix,
    latexFormat,
    dispf, disps, dispcf, format,
    dispDots, dispBlanks, dispShort,
-- * Conversion
    Convert(..),
    roundVector,
    fromInt,
    -- * Misc
    arctan2,
    rows, cols,
    separable,
    (¦),(——),
    module Data.Complex,
    CInt, Idxs,
    Vector, Matrix, GMatrix, nRows, nCols

) where

import Data.Packed.Vector
import Data.Packed.Matrix
import Data.Packed.Numeric
import Numeric.LinearAlgebra.Util hiding ((&),(#))
import Data.Complex
import Numeric.Sparse
import Data.Packed.Internal.Vector(Idxs)
import Data.Packed.Internal.Numeric(CInt,Extractor(..),(??),fromInt,range)