[Haskell-cafe] ANN: fixed-vector
carter.schonwald at gmail.com
Mon Nov 12 07:57:42 CET 2012
Michael, I think that calls for a type-class!
(though I imagine theres a slicker way of writing it)
On Sun, Nov 11, 2012 at 11:18 PM, Michael Orlitzky <michael at orlitzky.com>wrote:
> On 11/10/2012 06:59 AM, Aleksey Khudyakov wrote:
> > Hello cafe!
> > I want to announce library for the small vectors of fixed length
> > fixed-vector. Fixed means that vector's length is determined
> > by its type.
> > Generic API can work with both ATD-based vector like complex or
> > Vec written below and array-based ones.
> >> data Vec a = Vec a a a
> > It's based on post by Roman Leschinsiy.
> > Library also provide array-based vectors with memory
> > representation similar to onves from vector package. It's more
> > compact though because there is no need to store lengh and and
> > offset to first element.
> >  http://hackage.haskell.org/package/fixed-vector
> > 
> I have a lot of one-off code where I've defined these myself. Is it
> possible to e.g. define vectors in R^2 and R^3, and write the p-norm
> functions only once?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe