Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
7Raiden8788yWell, I think Matrix can get worse than that!
If you allocate everything in linear memory, i.e. access M[i + n*j], where n is the row dimension, than it's exactly as an array.
If you allocate the matrix statically, then again, it's in contiguous memory (not sure if it's row-wise or column-wise).
But if you allocate a jagged array of arrays, then you're gonna end up having rows in contiguous memory, but each row is not guaranteed to be close to each other!
Related Rants
Data Structures...
undefined
structure
data