[Haskell-cafe] Array, Vector, Bytestring
cgaebel at uwaterloo.ca
Tue Jun 4 05:19:38 CEST 2013
That's absolutely true. Wrappers around vector for your multidimensional
access is probably best, but Vectors of Vectors are usually easier.
But again, you're right. Multidimensional access is a pain. If it's a
"matrix" of numerical values, you could take a look at 'hmatrix'.
On Monday, June 3, 2013, Jason Dagit wrote:
> > How is this a problem?
> > If you're representing text, use 'text'.
> > If you're representing a string of bytes, use 'bytestring'.
> > If you want an "array" of values, think c++ and use 'vector'.
> > If you want to mutate arrays, first, make sure you do. You probably
> > If you're sure, use MVector.
> > Don't use String, except to interface with legacy code. You probably want
> > 'text'.
> > Don't use Array. Anything it can be used for, can be done with 'vector'.
> You have to build multidimensional accessors for vector yourself.
> Array supports them out of the box. I still prefer vector, but it's
> only fair to note that multidimensional data is a weak spot of vector.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe