+ 2
what are the uses of Multidimensional arrays?
benefits and disadvantages
3 ответов
+ 7
Multidimensional arrays are useful for representing any data that itself is multidimensional. That's a little circular, I know. Example time!
Representing a game board (I've done tic tac toe and othello, for instance), but if your wanted to do 3D chess...
I have done work in radio astronomy, and many times that data is multidimensional (most often time, frequency, and polarization) so you need these structures.
Many types of modeling have these types of dependencies, so call for these arrays.
In terms of downsides, you have to make your code clear, or it might be hard to read & maintain. In addition the memory requirements can be quite large. Instead of a 10 element array of ints taking up 10x the size of an int, a 10x10 takes 100, and 10x10x10 takes 1000.
When working with pulsar data, I've worked with irreducible blocks of 100s of megabytes at a time, so processing those took a while.
Hope this helps!
+ 5
take a city for example:
dimension 1 & 2: the street grid
dimension 3: floors of buildings
dimension 4: people living on the floor
dimension 5: details of the people
+ 1
Matrice