Skip to content

Instantly share code, notes, and snippets.

@RahulJyala7
Created February 14, 2020 16:46
Show Gist options
  • Select an option

  • Save RahulJyala7/f79c19b381fa39e0e261106331c2da58 to your computer and use it in GitHub Desktop.

Select an option

Save RahulJyala7/f79c19b381fa39e0e261106331c2da58 to your computer and use it in GitHub Desktop.
Vectors
In mathematics, "sparse" and "dense" often refer to the number of zero vs. non-zero elements in an array (e.g. vector or matrix).
---> A sparse array is one that contains mostly zeros and few non-zero entries.
---> A dense array contains mostly non-zeros.
here's no hard threshold for what counts as sparse; it's a loose term, but can be made more specific.
For example, a vector is k-sparse if it contains at most k non-zero entries. Another way of saying this is that the vector's ℓ0 norm is k.
(https://en.wikipedia.org/wiki/Norm_(mathematics))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment