Author |
Topic: sparse matrix/vector (Read 588 times) |
|
ONS
Newbie


Gender: 
Posts: 41
|
 |
sparse matrix/vector
« on: Apr 17th, 2010, 6:33am » |
Quote Modify
|
i was going through some algo using bit- vector where sparse vector is being used. what are these sparse vectors. googling didnt give me any satisfactory results. pls provide any relevant link, if any, to gain insight in this concept.
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
    
 Some people are average, some are just mean.
Gender: 
Posts: 13730
|
 |
Re: sparse matrix/vector
« Reply #1 on: Apr 17th, 2010, 7:05am » |
Quote Modify
|
A sparse matrix/vector is one that consists of mostly zeros, and therefore it is most easily represented by saying only what indices are nonzero. So, instead of storing a matrix 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 as 25 numbers, you'd store it as A[0][1]=1, A[2][5]=1, A[3][2]=1 (9 numbers including the indices). Wikipedia is usually a good reference: http://en.wikipedia.org/wiki/Sparse_matrix
|
« Last Edit: Apr 17th, 2010, 7:07am by towr » |
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
|