Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 1,517 posts.

Software Engineering
2021
1254

Sparse Matrices (2019)

A sparse matrix is a matrix that has a value of 0 for most elements. If the ratio of N umber of N on- Z ero ( NNZ ) elements to the size is less than 0.5, the matrix is sparse. While this is the mathematical definition, I will be using the term sparse for matrices with only NNZ elements and dense for matrices with all…