multidimensional data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

multidimensional data

Barry DeZonia
I've played with Haskell on and off for a number of years. I have a question that isn't directly related to Haskell only but to functional programming. Sorry if this is off topic.

In Haskell, how would you represent a 5 dimensional data structure of numeric values? Imagine a dataset with axes x, y, z, channel, and time. Is there an easy way to represent this in the data that doesn't run into all kinds of memory limits? How would you map the data to a new state such that the new state had pixel (1000, 2000, 100, 1, 20) set to 53?

Thanks for any info.

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: multidimensional data

Francesco Ariis
Hello Barry,

On Mon, Apr 22, 2019 at 04:25:47PM -0500, Barry DeZonia wrote:
> In Haskell, how would you represent a 5 dimensional data structure of
> numeric values? Imagine a dataset with axes x, y, z, channel, and time. Is
> there an easy way to represent this in the data that doesn't run into all
> kinds of memory limits? How would you map the data to a new state such that
> the new state had pixel (1000, 2000, 100, 1, 20) set to 53?

Maybe a HashMap[1] or similar structure?

[1] http://hackage.haskell.org/package/unordered-containers-0.2.10.0
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

multidimensional data

agander
In reply to this post by Barry DeZonia
On Monday, 22 April 2019, Barry DeZonia <[hidden email]> wrote:
I've played with Haskell on and off for a number of years. I have a question that isn't directly related to Haskell only but to functional programming. Sorry if this is off topic.

In Haskell, how would you represent a 5 dimensional data structure of numeric values? Imagine a dataset with axes x, y, z, channel, and time. Is there an easy way to represent this in the data that doesn't run into all kinds of memory limits? How would you map the data to a new state such that the new state had pixel (1000, 2000, 100, 1, 20) set to 53?

Maybe a lens [1]





_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners