sloisel / numeric

Numerical analysis in Javascript
http://www.numericjs.com/
Other
1.42k stars 177 forks source link

The "column compressed" sparse matrices are actually "row compressed" #32

Closed mikolalysenko closed 11 years ago

mikolalysenko commented 11 years ago

Not really an implementation issue, but really a question of terminology. According to wikipedia:

"...CSR is (val, col_ind, row_ptr), where val is an array of the (left-to-right, then top-to-bottom) non-zero values of the matrix; col_ind is the column indices corresponding to the values; and, row_ptr is the list of value indexes where each row starts"

Which is basically what numeric.js does (which makes sense, since it improves the speed of right hand vector multiplies). CSC is actually the transpose of this format.

mikolalysenko commented 11 years ago

Never mind, I am an idiot. I got confused because the matrix on the example page is actually symmetric :P http://numericjs.com/wordpress/?p=26