From 1925c123d7d8184a1d2ddc0a413e0fd2776e1083 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 8 May 2014 08:48:12 +0200 Subject: empty hmatrix-base --- packages/hmatrix/src/Numeric/HMatrix/Data.hs | 69 +++++++++++++++++++++++++++ packages/hmatrix/src/Numeric/HMatrix/Devel.hs | 69 +++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 packages/hmatrix/src/Numeric/HMatrix/Data.hs create mode 100644 packages/hmatrix/src/Numeric/HMatrix/Devel.hs (limited to 'packages/hmatrix/src/Numeric/HMatrix') diff --git a/packages/hmatrix/src/Numeric/HMatrix/Data.hs b/packages/hmatrix/src/Numeric/HMatrix/Data.hs new file mode 100644 index 0000000..568dc05 --- /dev/null +++ b/packages/hmatrix/src/Numeric/HMatrix/Data.hs @@ -0,0 +1,69 @@ +-------------------------------------------------------------------------------- +{- | +Module : Numeric.HMatrix.Data +Copyright : (c) Alberto Ruiz 2014 +License : GPL + +Maintainer : Alberto Ruiz +Stability : provisional + +Basic data processing. + +-} +-------------------------------------------------------------------------------- + +module Numeric.HMatrix.Data( + + -- * Vector + -- | 1D arrays are storable vectors from the vector package. + + Vector, (|>), dim, (@>), + + -- * Matrix + Matrix, (><), size, (@@>), trans, ctrans, + + -- * Construction + scalar, konst, build, assoc, accum, linspace, -- 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, + takeRows, dropRows, takeColumns, dropColumns, subMatrix, (?), (¿), fliprl, flipud, + + -- * Block matrix + fromBlocks, (¦), (——), diagBlock, repmat, toBlocks, toBlocksEvery, + + -- * Mapping functions + conj, cmap, step, cond, + + -- * Find elements + find, maxIndex, minIndex, maxElement, minElement, atIndex, + + -- * IO + disp, dispf, disps, dispcf, latexFormat, format, + loadMatrix, saveMatrix, fromFile, fileDimensions, + readMatrix, + fscanfVector, fprintfVector, freadVector, fwriteVector, + +-- * Conversion + Convert(..), + + -- * Misc + arctan2, + rows, cols, + separable, + + module Data.Complex + +) where + +import Data.Packed.Vector +import Data.Packed.Matrix +import Numeric.Container +import Numeric.LinearAlgebra.Util +import Data.Complex + diff --git a/packages/hmatrix/src/Numeric/HMatrix/Devel.hs b/packages/hmatrix/src/Numeric/HMatrix/Devel.hs new file mode 100644 index 0000000..b921f44 --- /dev/null +++ b/packages/hmatrix/src/Numeric/HMatrix/Devel.hs @@ -0,0 +1,69 @@ +-------------------------------------------------------------------------------- +{- | +Module : Numeric.HMatrix.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.HMatrix.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, + + -- * Auxiliary classes + Element, Container, Product, Contraction, LSDiv, + Complexable(), RealElement(), + RealOf, ComplexOf, SingleOf, DoubleOf, + IndexOf, + Field, Normed +) where + +import Data.Packed.Foreign +import Data.Packed.Development +import Data.Packed.ST +import Numeric.Container(Container,Contraction,LSDiv,Product, + Complexable(),RealElement(), + RealOf, ComplexOf, SingleOf, DoubleOf, IndexOf) +import Data.Packed +import Numeric.LinearAlgebra.Algorithms(Field,Normed) + -- cgit v1.2.3