There is also a counterpart which is called density array. What does this mean? I have done some search, but didn't get accurate information.
A strided array
arraysdata structuressparse-matrix
Related Topic
- Python – the difference between Python’s list methods append and extend
- Javascript – How to append something to an array
- Javascript – How to insert an item into an array at a specific index (JavaScript)
- Javascript – Sort array of objects by string property value
- Javascript – Loop through an array in JavaScript
- Javascript – How to remove a specific item from an array
- Javascript – For-each over an array in JavaScript
Best Answer
Say you have a structure
and an array
Then if you look at all the
someField
s in this array, they can be considered an array on their own, but they're not occupying consequent memory cells, so this array is strided. A stride here issizeof(SomeStruct)
, i.e. the distance between two consequent elements of the strided array.A sparse array mentioned here is a more general concept and actually a different one: a strided array doesn't contain zeroes in skipped memory cells, they're just not the part of the array.
Strided array is a generalization of usual (dense) arrays when
stride != sizeof(element)
.