From b8b7b47450a1007d4d8c77bb7d04e2744c3bfcd4 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 30 Apr 2014 09:59:54 +0200 Subject: better reexport modules --- lib/Numeric/LinearAlgebra/Data.hs | 78 +++++++++++++++++++++++++++++++++ lib/Numeric/LinearAlgebra/Data/Devel.hs | 63 ++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 lib/Numeric/LinearAlgebra/Data/Devel.hs (limited to 'lib') diff --git a/lib/Numeric/LinearAlgebra/Data.hs b/lib/Numeric/LinearAlgebra/Data.hs index 10ad650..6e5dcef 100644 --- a/lib/Numeric/LinearAlgebra/Data.hs +++ b/lib/Numeric/LinearAlgebra/Data.hs @@ -11,6 +11,84 @@ Stability : provisional -------------------------------------------------------------------------------- module Numeric.LinearAlgebra.Data( + -- * Vector + Vector, (|>), dim, (@>), + -- * Matrix + Matrix, (><), size, (@@>), trans, ctrans, + + -- * Construction functions + + scalar, konst, build, assoc, accum, linspace, -- ones, zeros, + + -- * Data manipulation + + fromList, toList, subVector, takesV, vjoin, + + flatten, reshape, asRow, asColumn, row, col, + + fromRows, toRows, fromColumns, toColumns, fromLists, toLists, + + takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud, + + -- * Diagonal matrices + + ident, diag, diagl, diagRect, takeDiag, + + -- * Block matrices + + fromBlocks, (¦), (——), diagBlock, repmat, toBlocks, toBlocksEvery, + + -- * Mapping functions + + conj, cmap, step, cond, + + -- * Find elements + + find, maxIndex, minIndex, maxElement, minElement, atIndex, + + -- * Products + + (<>), (·), scale, outer, kronecker, cross, + sumElements, prodElements, absSum, + optimiseMult, + + corr, conv, corrMin, corr2, conv2, + + LSDiv(..), + + -- * Random arrays + + rand, randn, RandDist(..), randomVector, gaussianSample, uniformSample, + + -- * IO + + disp, dispf, disps, dispcf, vecdisp, latexFormat, format, + loadMatrix, saveMatrix, fromFile, fileDimensions, + readMatrix, + fscanfVector, fprintfVector, freadVector, fwriteVector, + +-- * Element conversion + Convert(..), + Complexable(), + RealElement(), + + RealOf, ComplexOf, SingleOf, DoubleOf, + + IndexOf, + + module Data.Complex, + + -- * Misc + meanCov, arctan2, + separable, + fromArray2D + ) where +import Data.Packed.Vector +import Data.Packed.Matrix +import Numeric.Container +import Numeric.LinearAlgebra.Util +import Data.Complex + diff --git a/lib/Numeric/LinearAlgebra/Data/Devel.hs b/lib/Numeric/LinearAlgebra/Data/Devel.hs new file mode 100644 index 0000000..6358d1f --- /dev/null +++ b/lib/Numeric/LinearAlgebra/Data/Devel.hs @@ -0,0 +1,63 @@ +-------------------------------------------------------------------------------- +{- | +Module : Numeric.LinearAlgebra.Data.Devel +Copyright : (c) Alberto Ruiz 2014 +License : GPL + +Maintainer : Alberto Ruiz +Stability : provisional + +The library can be easily extended using the tools in this module. + +-} +-------------------------------------------------------------------------------- + +module Numeric.LinearAlgebra.Data.Devel( + -- * FFI helpers + -- | Sample usage, to upload a perspective matrix to a shader. + -- + -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3) + -- @ + module Data.Packed.Foreign, + + -- * FFI tools + -- | Illustrative usage examples can be found + -- in the @examples\/devel@ folder included in the package. + module Data.Packed.Development, + + -- * ST + -- | In-place manipulation inside the ST monad. + -- See examples\/inplace.hs in the distribution. + + -- ** Mutable Vectors + STVector, newVector, thawVector, freezeVector, runSTVector, + readVector, writeVector, modifyVector, liftSTVector, + -- ** Mutable Matrices + STMatrix, newMatrix, thawMatrix, freezeMatrix, runSTMatrix, + readMatrix, writeMatrix, modifyMatrix, liftSTMatrix, + -- ** Unsafe functions + newUndefinedVector, + unsafeReadVector, unsafeWriteVector, + unsafeThawVector, unsafeFreezeVector, + newUndefinedMatrix, + unsafeReadMatrix, unsafeWriteMatrix, + unsafeThawMatrix, unsafeFreezeMatrix, + + -- * Special maps and zips + mapVectorWithIndex, zipVector, zipVectorWith, unzipVector, unzipVectorWith, + mapVectorM, mapVectorM_, mapVectorWithIndexM, mapVectorWithIndexM_, + foldLoop, foldVector, foldVectorG, foldVectorWithIndex, + mapMatrixWithIndex, mapMatrixWithIndexM, mapMatrixWithIndexM_, + liftMatrix, liftMatrix2, liftMatrix2Auto, + + -- * Misc + Element, Container +) where + +import Data.Packed.Foreign +import Data.Packed.Development +import Data.Packed.ST +import Numeric.Container(Container) +import Data.Packed + + -- cgit v1.2.3