numhask-array: n-dimensional arrays

[ bsd3, library, project ] [ Propose Tags ]

n-dimensional arrays founded on numhask.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1, 0.0.2, 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.2.0.1, 0.2.1.0, 0.3, 0.3.0.1, 0.4.0.0, 0.5.0.0, 0.5.1, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.10.2, 0.11.0.0, 0.11.0.1
Dependencies adjunctions (>=4.0 && <5), base (>=4.11 && <5), deepseq (>=1.4.2.0 && <2), distributive (>=0.4 && <0.7), hmatrix (>=0.18), numhask (>=0.6 && <0.7), vector (>=0.10 && <0.13) [details]
License BSD-3-Clause
Copyright Tony Day
Author Tony Day
Maintainer tonyday567@gmail.com
Category project
Home page https://github.com/tonyday567/numhask-array#readme
Bug tracker https://github.com/tonyday567/numhask-array/issues
Source repo head: git clone https://github.com/tonyday567/numhask-array
Uploaded by tonyday567 at 2020-07-15T22:38:41Z
Distributions LTSHaskell:0.11.0.1, NixOS:0.11.0.1, Stackage:0.11.0.1
Reverse Dependencies 6 direct, 5 indirect [details]
Downloads 6930 total (67 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-07-15 [all 1 reports]

Readme for numhask-array-0.7.0

[back to package description]

numhask-array

Build Status Hackage

Arrays are higher-kinded numbers that can be indexed into with an Int list. Higher-kinded numbers are things with a non-primitive type that we wish to use the usual numerical operators on (+,-,*,/,abs).

This is an experimental library that:

  • allows shape to be specified at both the type and value level.
  • provides operators at value and type level to help manipulate shapes.
  • Provides fixed and dynamic arrays with the same API.

Performance experiments are located in numhask-bench

Usefulness of the array language that results from this treatment is yet to be explored.

API of an array language

https://en.wikipedia.org/wiki/APL_(programming_language)

See http://hiperfit.dk/pdf/array14_final.pdf for context and a sketch of an intermediate typed array language effort.

The operators that result from using the Representable type - separation of size tracking at compile level, from computational at runtime - ends up looking like APL.

Matrix multiplication in APL is +.x and in numhask-array is dot sum (*). There is a slight increase in abstraction by explicitly exposing the fold in the algorithm, but the expressions are both very neat and abstracted away from the specialisation of multiplying matrices.

References

https://blog.plover.com/prog/apl-matrix-product.html

https://en.wikipedia.org/wiki/Tensor_contraction

https://en.wikipedia.org/wiki/Tensor_(intrinsic_definition)#Definition:_Tensor_Product_of_Vector_Spaces