3 ms·
I presume "sparseness" comes from the mathematical concept[1] but the definitions I've always seen have been: - Sparse: Most of the data is "missing" - Dense:
by Amorymeltzer 5y ago
I presume "sparseness" comes from the mathematical concept[1] but the definitions I've always seen have been:
- Sparse: Most of the data is "missing"
- Dense: Most of the data is not "missing"
The key words being "most" rather than "any" or "none."
At any rate, I suppose it depends on the language and how you view data, but to my mind that's just how arrays work.
1: https://en.wikipedia.org/wiki/Sparse_matrix https://en.wikipedia.org/wiki/Sparse_matrix
- deleted 5y ago[deleted]
- goto11 5y agoIn the context of JavaScript it means some numeric keys are missing (between 0 and the highest numeric key). This is an issue because JavaScript Arrays are not like arrays in other languages - they are dictionaries where the keys happen to be numeric. So it is possible for a numeric key not to be defined, which is different from it being defined but having "undefined" as a value.
- deleted 5y ago[deleted]