# hmatrix

Numeric Linear Algebra https://github.com/albertoruiz/hmatrix

Version on this page: | 0.16.1.5 |

LTS Haskell 12.14: | 0.19.0.0 |

Stackage Nightly 2018-10-22: | 0.19.0.0 |

Latest on Hackage: | 0.19.0.0 |

BSD3 licensed and maintained by

**Alberto Ruiz**#### Module documentation for 0.16.1.5

- Numeric

Linear systems, matrix decompositions, and other numerical computations based on BLAS and LAPACK.

Standard interface: `Numeric.LinearAlgebra`

.

Safer interface with statically checked dimensions: `Numeric.LinearAlgebra.Static`

.

Code examples: http://dis.um.es/~alberto/hmatrix/hmatrix.html

## Changes

0.18.0.0

--------

* Many new functions and instances in the Static module

* meanCov and gaussianSample use Herm type

* thinQR, thinRQ

* compactSVDTol

* unitary changed to normalize, also admits Vector (Complex Double)

0.17.0.0

--------

* eigSH, chol, and other functions that work with Hermitian or symmetric matrices

now take a special "Herm" argument that can be created by means of "sym"

or "mTm". The unchecked versions of those functions have been removed and we

use "trustSym" to create the Herm type when the matrix is known to be Hermitian/symmetric.

* Improved matrix extraction (??) and rectangular matrix slices without data copy

* Basic support of Int32 and Int64 elements

* remap, more general cond, sortIndex

* Experimental support of type safe modular arithmetic, including linear

system solver and LU factorization

* Elementary row operations and inplace matrix slice products in the ST monad

* Improved development tools.

* Old compatibility modules removed, simpler organization of internal modules

* unitary, pairwiseD2, tr'

* ldlPacked, ldlSolve for indefinite symmetric systems (apparently not faster

than the general solver based on the LU)

* LU, LDL, and QR types for these compact decompositions.

0.16.1.0

--------

* Added (|||) and (===) for "besides" and "above"

* rowOuters

0.16.0.0

--------

* The modules Numeric.GSL.* have been moved to the new package hmatrix-gsl.

* The package "hmatrix" now depends only on BLAS and LAPACK and the

license has been changed to BSD3.

* Added more organized reexport modules:

Numeric.LinearAlgebra.HMatrix

Numeric.LinearAlgebra.Data

Numeric.LinearAlgebra.Devel

For normal usage we only need to import Numeric.LinearAlgebra.HMatrix.

(The documentation is now hidden for Data.Packed.*, Numeric.Container, and

the other Numeric.LinearAlgebra.* modules, but they continue to be exposed

for backwards compatibility.)

* Added support for empty arrays, extending automatic conformability

(very useful for construction of block matrices).

* Added experimental support for sparse linear systems.

* Added experimental support for static dimension checking and inference

using type-level literals.

* Added a different operator for the matrix-vector product.

(available from the new reexport module).

* "join" deprecated (use "vjoin").

* "dot" now conjugates the first input vector.

* Added "udot" (unconjugated dot product).

* Added to/from ByteString

* Added "sortVector", "roundVector"

* Added Monoid instance for Matrix using matrix product.

* Added several pretty print functions

* Improved "build", "konst", "linspace", "LSDiv", loadMatrix', and other small changes.

* In hmatrix-glpk: (:=>:) change to (:>=:). Added L_1 linear system solvers.

* Improved error messages.

* Added many usage examples in the documentation.

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.

--------

* Many new functions and instances in the Static module

* meanCov and gaussianSample use Herm type

* thinQR, thinRQ

* compactSVDTol

* unitary changed to normalize, also admits Vector (Complex Double)

0.17.0.0

--------

* eigSH, chol, and other functions that work with Hermitian or symmetric matrices

now take a special "Herm" argument that can be created by means of "sym"

or "mTm". The unchecked versions of those functions have been removed and we

use "trustSym" to create the Herm type when the matrix is known to be Hermitian/symmetric.

* Improved matrix extraction (??) and rectangular matrix slices without data copy

* Basic support of Int32 and Int64 elements

* remap, more general cond, sortIndex

* Experimental support of type safe modular arithmetic, including linear

system solver and LU factorization

* Elementary row operations and inplace matrix slice products in the ST monad

* Improved development tools.

* Old compatibility modules removed, simpler organization of internal modules

* unitary, pairwiseD2, tr'

* ldlPacked, ldlSolve for indefinite symmetric systems (apparently not faster

than the general solver based on the LU)

* LU, LDL, and QR types for these compact decompositions.

0.16.1.0

--------

* Added (|||) and (===) for "besides" and "above"

* rowOuters

0.16.0.0

--------

* The modules Numeric.GSL.* have been moved to the new package hmatrix-gsl.

* The package "hmatrix" now depends only on BLAS and LAPACK and the

license has been changed to BSD3.

* Added more organized reexport modules:

Numeric.LinearAlgebra.HMatrix

Numeric.LinearAlgebra.Data

Numeric.LinearAlgebra.Devel

For normal usage we only need to import Numeric.LinearAlgebra.HMatrix.

(The documentation is now hidden for Data.Packed.*, Numeric.Container, and

the other Numeric.LinearAlgebra.* modules, but they continue to be exposed

for backwards compatibility.)

* Added support for empty arrays, extending automatic conformability

(very useful for construction of block matrices).

* Added experimental support for sparse linear systems.

* Added experimental support for static dimension checking and inference

using type-level literals.

* Added a different operator for the matrix-vector product.

(available from the new reexport module).

* "join" deprecated (use "vjoin").

* "dot" now conjugates the first input vector.

* Added "udot" (unconjugated dot product).

* Added to/from ByteString

* Added "sortVector", "roundVector"

* Added Monoid instance for Matrix using matrix product.

* Added several pretty print functions

* Improved "build", "konst", "linspace", "LSDiv", loadMatrix', and other small changes.

* In hmatrix-glpk: (:=>:) change to (:>=:). Added L_1 linear system solvers.

* Improved error messages.

* Added many usage examples in the documentation.

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.

Depends on 10 packages:

Used by 95 packages:

arpack, boltzmann-brain, boltzmann-samplers, calculator, camfort, cl3-hmatrix-interface, classify-frog, computational-algebra, csa, cubicspline, dynobud, fastbayes, fpnla-examples, goal-geometry, goal-probability, goal-simulation, grenade, HABQT, hahp, hakaru, hamilton, HasGP, HaskellLM, haskell-ml, HaskellNN, Haskelloids, hfoil, hirt, HLearn-distributions, hmatrix-backprop, hmatrix-banded, hmatrix-csv, hmatrix-glpk, hmatrix-gsl, hmatrix-gsl-stats, hmatrix-mmap, hmatrix-morpheus, hmatrix-nipals, hmatrix-nlopt, hmatrix-quadprogpp,

**and many more**comments powered byDisqus

A service provided by
FP Complete