From 197e88c3b56d28840217010a2871c6ea3a4dd1a4 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 21 May 2014 10:30:55 +0200 Subject: update dependencies, move examples etc --- packages/base/CHANGELOG | 219 +++++++++++++++++++++++++++++++++++++++ packages/base/INSTALL.md | 117 +++++++++++++++++++++ packages/base/THANKS.md | 157 ++++++++++++++++++++++++++++ packages/base/hmatrix-base.cabal | 84 --------------- packages/base/hmatrix.cabal | 86 +++++++++++++++ 5 files changed, 579 insertions(+), 84 deletions(-) create mode 100644 packages/base/CHANGELOG create mode 100644 packages/base/INSTALL.md create mode 100644 packages/base/THANKS.md delete mode 100644 packages/base/hmatrix-base.cabal create mode 100644 packages/base/hmatrix.cabal (limited to 'packages/base') diff --git a/packages/base/CHANGELOG b/packages/base/CHANGELOG new file mode 100644 index 0000000..99a6845 --- /dev/null +++ b/packages/base/CHANGELOG @@ -0,0 +1,219 @@ +0.16.0.0 +-------- + + * created hmatrix-base + + * Added more organized reexport modules: + Numeric.HMatrix, Numeric.HMatrix.Data, Numeric.HMatrix.Devel + (The documentation is hidden for the other modules, + but they continue to be exposed and are not deprecated) + + * added support for empty arrays + + * join deprecated, use vjoin + + * dot now conjugates the first input vector + * added udot (unconjugated dot product) + + * (<.>) overloaded to matrix and dot products + * added Monoid instance for Matrix using matrix product + + * improved build and konst + + * improved linspace + + * improved error messages + * more usage examples + + * simplified LSDiv + * Plot functions moved to Numeric.LinearAlgebra.Util + * removed (!) (use (¦)), added (——) + +0.15.2.0 +-------- + + * general pinvTol and improved pinv + +0.15.1.0 +-------- + + * One-dimensional minimization + + * Doubly-adaptive quadrature for difficult integrands + +0.15.0.0 +-------- + + * Data.Packed.Foreign (additional FFI helpers) + + * NFData instance of Matrix + + * Unidimensional root finding + + * In Numeric.LinearAlgebra.Util: + pairwise2D, rowOuters, null1, null1sym, size, unitary, mt, (¦), (?), (¿) + + * diagBlock + + * meanCov moved to Container + +0.14.1.0 +-------- + + * In Numeric.LinearAlgebra.Util: + convolution: corr, conv, corr2, conv2, separable, corrMin + kronecker: vec, vech, dup, vtrans + +0.14.0.0 +-------- + + * integration over infinite intervals + + * msadams and msbdf methods for ode + + * Numeric.LinearAlgebra.Util + + * (<\>) extended to multiple right-hand sides + + * orth + +0.13.0.0 +-------- + + * tests moved to new package hmatrix-tests + +0.11.2.0 +-------- + + * geigSH' (symmetric generalized eigensystem) + + * mapVectorWithIndex + +0.11.1.0 +-------- + + * exported Mul + + * mapMatrixWithIndex{,M,M_} + +0.11.0.0 +-------- + + * flag -fvector default = True + + * invlndet (inverse and log of determinant) + + * step, cond + + * find + + * assoc, accum + +0.10.0.0 +-------- + + * Module reorganization + + * Support for Float and Complex Float elements (excluding LAPACK computations) + + * Binary instances for Vector and Matrix + + * optimiseMult + + * mapVectorM, mapVectorWithIndexM, unzipVectorWith, and related functions. + + * diagRect admits diagonal vectors of any length without producing an error, + and takes an additional argument for the off-diagonal elements. + + * different signatures in some functions + +0.9.3.0 +-------- + + * flag -fvector to optionally use Data.Vector.Storable.Vector + without any conversion. + + * Simpler module structure. + + * toBlocks, toBlocksEvery + + * cholSolve, mbCholSH + + * GSL Nonlinear Least-Squares fitting using Levenberg-Marquardt. + + * GSL special functions moved to separate package hmatrix-special. + + * Added offset of Vector, allowing fast, noncopy subVector (slice). + Vector is now identical to Roman Leshchinskiy's Data.Vector.Storable.Vector, + so we can convert from/to them in O(1). + + * Removed Data.Packed.Convert, see examples/vector.hs + +0.8.3.0 +-------- + + * odeSolve + + * Matrix arithmetic automatically replicates matrix with single row/column + + * latexFormat, dispcf + +0.8.2.0 +-------- + + * fromRows/fromColumns now automatically expand vectors of dim 1 + to match the common dimension. + fromBlocks also replicates single row/column matrices. + Previously all dimensions had to be exactly the same. + + * display utilities: dispf, disps, vecdisp + + * scalar + + * minimizeV, minimizeVD, using Vector instead of lists. + +0.8.1.0 +-------- + + * runBenchmarks + +0.8.0.0 +-------- + + * singularValues, fullSVD, thinSVD, compactSVD, leftSV, rightSV + and complete interface to [d|z]gesdd. + Algorithms based on the SVD of large matrices can now be + significantly faster. + + * eigenvalues, eigenvaluesSH + + * linearSolveLS, rq + +0.7.2.0 +-------- + + * ranksv + +0.7.1.0 +-------- + + * buildVector/buildMatrix + + * removed NFData instances + +0.6.0.0 +-------- + + * added randomVector, gaussianSample, uniformSample, meanCov + + * added rankSVD, nullspaceSVD + + * rank, nullspacePrec, and economy svd defined in terms of ranksvd. + + * economy svd now admits zero rank matrices and return a "degenerate + rank 1" decomposition with zero singular value. + + * added NFData instances for Matrix and Vector. + + * liftVector, liftVector2 replaced by mapVector, zipVector. + diff --git a/packages/base/INSTALL.md b/packages/base/INSTALL.md new file mode 100644 index 0000000..ef51167 --- /dev/null +++ b/packages/base/INSTALL.md @@ -0,0 +1,117 @@ +# [hmatrix][hmatrix2] installation + +This package requires the [Glasgow Haskell Compiler](http://www.haskell.org/ghc/index.html) ghc >= 6.10, and [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install), conveniently available in the [Haskell Platform](http://hackage.haskell.org/platform), and the development packages for [GSL](http://www.gnu.org/software/gsl) and BLAS/[LAPACK](http://www.netlib.org/lapack). (The graphical functions also require **gnuplot** and **imagemagick**.) + +[hmatrix]: http://code.haskell.org/hmatrix +[hmatrix2]: http://perception.inf.um.es/hmatrix + + +## Linux ################################################## + + +Ubuntu/Debian: + + $ sudo apt-get install libgsl0-dev liblapack-dev + $ cabal install hmatrix + +Arch Linux: If the automatic installation from Hackage fails, install atlas-lapack and gsl, unpack the source, change the build-type to Simple in hmatrix.cabal (line 28) and add extra-libraries: gsl lapack (line 194). + +Other distributions may require additional libraries. They can be given in a **--configure-option**. + +## Mac OS/X ############################################### + + +GSL must be installed via Homebrew or MacPorts. + +Via Homebrew: + + $ brew install gsl + $ cabal install hmatrix + +Via MacPorts: + + $ sudo port install gsl +universal + $ cabal install hmatrix + +(Contributed by Heinrich Apfelmus, Torsten Kemps-Benedix and Ted Fujimoto). + +## Windows ############################################### + +We use this [GSL binary](http://www.miscdebris.net/blog/2009/04/20/mingw-345-binaries-of-gnu-scientific-library-112-for-use-with-mingw-and-visual-c/), and blas/lapack dlls built with g77 (contributed by Gilberto Camara). All required files are in [gsl-lapack-windows.zip][winpack]. + +(Due to [issue 21](https://github.com/albertoruiz/hmatrix/issues/21) we need hmatrix-0.13.1.0.) + +1) Install the Haskell Platform (tested on 2011.2.0.1) + + > cabal update + +2) Download and unzip the following file into a stable folder %GSL% + + http://perception.inf.um.es/hmatrix/gsl-lapack-windows.zip + +3.a) In a msys shell the installation should be fully automatic: + + $ cabal install hmatrix-0.13.1.0 --extra-lib-dir=${GSL} --extra-include-dir=${GSL} + +3.b) Alternatively, in a normal windows cmd: + + > cabal unpack hmatrix-0.13.1.0 + + Edit hmatrix.cabal, in line 28 change build-type to "Simple", and then + + > cabal install --extra-lib-dir=%GSL% --extra-include-dir=%GSL% + + It may be necessary to put the dlls in the search path. + + +NOTE: The examples using graphics do not yet work in windows. + +[install]: http://code.haskell.org/hmatrix/INSTALL +[install2]: http://patch-tag.com/r/aruiz/hmatrix/snapshot/current/content/pretty/INSTALL +[winpack2]: http://perception.inf.um.es/hmatrix/gsl-lapack-windows.zip +[winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip + +## Tests ############################################### + +After installation we must verify that the library works as expected: + + $ cabal install hmatrix-tests --enable-tests + $ ghci + > Numeric.LinearAlgebra.Tests.runTests 20 + OK, passed 100 tests. + OK, passed 100 tests. + ... etc... + +If you get any failure please run lapack's own tests to confirm that your version is not broken. For instance, in ubuntu 9.04, **libatlas-sse2** does not work (see this [bug report](https://bugs.launchpad.net/ubuntu/+source/atlas/+bug/368478)). If your lapack library is ok but hmatrix's tests fail please send a bug report! + + +## Optimized BLAS/LAPACK ########################################## + +I have successfully tested ATLAS and MKL on Linux. + +### [ATLAS](http://math-atlas.sourceforge.net/) #################### + +In Ubuntu >= 9.04 we need: + + $ sudo apt-get install libatlas-base-dev + +In older Ubuntu/Debian versions we needed: + + $ sudo apt-get install refblas3-dev lapack3-dev atlas3-base-dev + +We may use a version (sse2, 3dnow, etc.) optimized for the machine. + +### Intel's MKL ############################################### + +There is a free noncommercial download available from Intel's website. To use it I have added the following lines in my .bashrc configuration file: + + export LD_LIBRARY_PATH=/path/to/mkl/lib/arch + export LIBRARY_PATH=/path/to/mkl/lib/arch + +where arch = 32 or em64t. + +The library must be installed with the -fmkl flag: + + $ cabal install hmatrix -fmkl + + diff --git a/packages/base/THANKS.md b/packages/base/THANKS.md new file mode 100644 index 0000000..b1417a6 --- /dev/null +++ b/packages/base/THANKS.md @@ -0,0 +1,157 @@ +I thank Don Stewart, Henning Thielemann, Bulat Ziganshin, Heinrich Apfelmus, +and all the people in the Haskell mailing lists for their help. + +I am particularly grateful to Vivian McPhail for his excellent +contributions: improved configure.hs, Binary instances for +Vector and Matrix, support for Float and Complex Float elements, +module reorganization, monadic mapVectorM, and many other improvements. + +- Nico Mahlo discovered a bug in the eigendecomposition wrapper. + +- Frederik Eaton discovered a bug in the design of the wrappers. + +- Eric Kidd has created a wiki page explaining the installation on MacOS X: + http://www.haskell.org/haskellwiki/GSLHaskell_on_MacOS_X + +- Fawzi Mohamed discovered a portability bug in the lapack wrappers. + +- Pedro E. López de Teruel fixed the interface to lapack. + +- Antti Siira discovered a bug in the plotting functions. + +- Paulo Tanimoto helped to fix the configuration of the required libraries. + He also discovered the segfault of minimize.hs in ghci. + +- Xiao-Yong Jin reported a bug on x86_64 caused by the assumptions in f2c.h, + which are wrong for this architecture. + +- Jason Schroeder reported an error in the documentation. + +- Bulat Ziganshin gave invaluable help for the ST monad interface to + in-place modifications. + +- Don Stewart fixed the implementation of the internal data structures + to achieve excellent, C-like performance in Haskell functions which + explicitly work with the elements of vectors and matrices. + +- Dylan Alex Simon improved the numeric instances to allow optimized + implementations of signum and abs on Vectors. + +- Pedro E. López de Teruel discovered the need of asm("finit") to + avoid the wrong NaNs produced by foreign functions. + +- Reiner Pope added support for luSolve, based on (d|z)getrs. + Made Matrix a product type and added changes to improve the code generated + by hmatrix-syntax. + +- Simon Beaumont reported the need of QuickCheck<2 and the invalid + asm("finit") on ppc. He also contributed the configuration options + for the accelerate framework on OS X. + +- Daniel Schüssler added compatibility with QuickCheck 2 as well + as QuickCheck 1 using the C preprocessor. He also added some + implementations for the new "shrink" method of class Arbitrary. + +- Tracy Wadleigh improved the definitions of (|>) and (><), which now + apply an appropriate 'take' to the given lists so that they may be + safely used on lists that are too long (or infinite). + +- Chris Waterson improved the configure.hs program for OS/X. + +- Erik de Castro Lopo added buildVector and buildMatrix, which take a + size parameter(s) and a function that maps vector/matrix indices + to the values at that position. + +- Jean-Francois Tremblay discovered an error in the tutorial. + +- Gilberto Camara contributed improved blas and lapack dlls for Windows. + +- Heinrich Apfelmus fixed hmatrix.cabal for OS/X. He also tested the package + on PPC discovering a problem in zgesdd. + +- Felipe Lessa tested the performance of GSL special function bindings + and contributed the cabal flag "safe-cheap". + +- Ozgur Akgun suggested better symbols for the Bound constructors in the + Linear Programming package. + +- Tim Sears reported the zgesdd problem also in intel mac. + +- Max Suica simplified the installation on Windows and improved the instructions. + +- John Billings first reported an incompatibility with QuickCheck>=2.1.1 + +- Alexey Khudyakov cleaned up PRAGMAS and fixed some hlint suggestions. + +- Torsten Kemps-Benedix reported an installation problem in OS/X. + +- Stefan Kersten fixed hmatrix.cabal for 64-bit ghc-7 in OS/X + +- Sacha Sokoloski reported an installation problem on Arch Linux and + helped with the configuration. + +- Carter Schonwald helped with the configuration for Homebrew OS X and + found a tolerance problem in test "1E5 rots". He also discovered + a bug in the signature of cmap. + +- Duncan Coutts reported a problem with configure.hs and contributed + a solution and a simplified Setup.lhs. + +- Mark Wright fixed the import of vector >= 0.8. + +- Bas van Dijk fixed the import of vector >= 0.8, got rid of some + deprecation warnings, used more explicit imports, and updated to ghc-7.4. + +- Tom Nielsen discovered a problem in Config.hs, exposed by link problems + in Ubuntu 11.10 beta. + +- Daniel Fischer reported some Haddock markup errors. + +- Danny Chan added support for integration over infinite intervals, and fixed + Configure.hs using platform independent functions. + +- Clark Gaebel removed superfluous thread safety. + +- Jeffrey Burdges reported a glpk link problem on OS/X + +- Jian Zhang reported the Windows installation problem due to new ODE interface. + +- Mihaly Barasz and Ben Gamari fixed mapMatrix* and mapMatrixWithIndex + +- Takano Akio fixed off-by-one errors in gsl-aux.c producing segfaults. + +- Alex Lang implemented uniRoot and uniRootJ for one-dimensional root-finding. + +- Mike Ledger contributed alternative FFI helpers for matrix interoperation with C + +- Stephen J. Barr suggested flipping argument order in the double integral example + +- Greg Horn fixed the bus error on ghci 64-bit. + +- Kristof Bastiaensen added bindings for one-dimensional minimization. + +- Matthew Peddie added bindings for gsl_integrate_cquad doubly-adaptive quadrature + for difficult integrands. + +- Ben Gamari exposed matrixFromVector for Development. + +- greg94301 reported tolerance issues in the tests. + +- Clemens Lang updated the MacPort installation instructions. + +- Henning Thielemann reported the pinv inefficient implementation. + +- bdoering reported the problem of zero absolute tolerance in the integration functions. + +- Alexei Uimanov replaced fromList by Vector.fromList. + +- Adam Vogt updated the code for ghc-7.7 + +- Mike Meyer (mwm) added freeBSD library configuration information. + +- tfgit updated the OSX installation instructions via Homebrew + +- "yokto" and "ttylec" reported the problem with the dot product of complex vectors. + +- Samium Gromoff reported a build failure caused by a size_t - int mismatch. + diff --git a/packages/base/hmatrix-base.cabal b/packages/base/hmatrix-base.cabal deleted file mode 100644 index 91dc0db..0000000 --- a/packages/base/hmatrix-base.cabal +++ /dev/null @@ -1,84 +0,0 @@ -Name: hmatrix -Version: 0.16.0.2 -License: BSD3 -License-file: LICENSE -Author: Alberto Ruiz -Maintainer: Alberto Ruiz -Stability: provisional -Homepage: https://github.com/albertoruiz/hmatrix -Synopsis: Numeric Linear Algebra -Description: Dense linear algebra based on BLAS and LAPACK. -Category: Math -tested-with: GHC==7.8 - -cabal-version: >=1.8 - -build-type: Simple - -extra-source-files: src/C/lapack-aux.h - -library - - Build-Depends: base, - binary, - array, - deepseq, - random, - storable-complex, - vector >= 0.8 - - hs-source-dirs: src - - exposed-modules: Data.Packed, - Data.Packed.Vector, - Data.Packed.Matrix, - Data.Packed.Foreign, - Data.Packed.ST, - Data.Packed.Development, - - Numeric.LinearAlgebra.LAPACK - Numeric.LinearAlgebra.Algorithms - Numeric.Container - Numeric.LinearAlgebra.Util - - Numeric.LinearAlgebra - Numeric.LinearAlgebra.Devel - Numeric.LinearAlgebra.Data - - other-modules: Data.Packed.Internal, - Data.Packed.Internal.Common, - Data.Packed.Internal.Signatures, - Data.Packed.Internal.Vector, - Data.Packed.Internal.Matrix - Data.Packed.IO - Numeric.Chain - Numeric.Vectorized - Numeric.Vector - Numeric.Matrix - Data.Packed.Internal.Numeric - Numeric.LinearAlgebra.Util.Convolution - Numeric.LinearAlgebra.Random - Numeric.Conversion - - C-sources: src/C/lapack-aux.c - src/C/vector-aux.c - - - extensions: ForeignFunctionInterface, - CPP - - ghc-options: -Wall - -fno-warn-missing-signatures - -fno-warn-orphans - - cc-options: -O4 -msse2 -Wall - - cpp-options: -DBINARY - - extra-libraries: blas lapack - - -source-repository head - type: git - location: https://github.com/albertoruiz/hmatrix - diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal new file mode 100644 index 0000000..5f3c48e --- /dev/null +++ b/packages/base/hmatrix.cabal @@ -0,0 +1,86 @@ +Name: hmatrix +Version: 0.16.0.2 +License: BSD3 +License-file: LICENSE +Author: Alberto Ruiz +Maintainer: Alberto Ruiz +Stability: provisional +Homepage: https://github.com/albertoruiz/hmatrix +Synopsis: Numeric Linear Algebra +Description: Dense linear algebra based on BLAS and LAPACK. +Category: Math +tested-with: GHC==7.8 + +cabal-version: >=1.8 + +build-type: Simple + +extra-source-files: THANKS.md INSTALL.md CHANGELOG + +extra-source-files: src/C/lapack-aux.h + +library + + Build-Depends: base, + binary, + array, + deepseq, + random, + storable-complex, + vector >= 0.8 + + hs-source-dirs: src + + exposed-modules: Data.Packed, + Data.Packed.Vector, + Data.Packed.Matrix, + Data.Packed.Foreign, + Data.Packed.ST, + Data.Packed.Development, + + Numeric.LinearAlgebra.LAPACK + Numeric.LinearAlgebra.Algorithms + Numeric.Container + Numeric.LinearAlgebra.Util + + Numeric.LinearAlgebra + Numeric.LinearAlgebra.Devel + Numeric.LinearAlgebra.Data + + other-modules: Data.Packed.Internal, + Data.Packed.Internal.Common, + Data.Packed.Internal.Signatures, + Data.Packed.Internal.Vector, + Data.Packed.Internal.Matrix + Data.Packed.IO + Numeric.Chain + Numeric.Vectorized + Numeric.Vector + Numeric.Matrix + Data.Packed.Internal.Numeric + Numeric.LinearAlgebra.Util.Convolution + Numeric.LinearAlgebra.Random + Numeric.Conversion + + C-sources: src/C/lapack-aux.c + src/C/vector-aux.c + + + extensions: ForeignFunctionInterface, + CPP + + ghc-options: -Wall + -fno-warn-missing-signatures + -fno-warn-orphans + + cc-options: -O4 -msse2 -Wall + + cpp-options: -DBINARY + + extra-libraries: blas lapack + + +source-repository head + type: git + location: https://github.com/albertoruiz/hmatrix + -- cgit v1.2.3