wu :: forums
« wu :: forums - sparse matrix/vector »

Welcome, Guest. Please Login or Register.
May 1st, 2025, 11:19am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: SMQ, Icarus, ThudnBlunder, towr, Grimbal, Eigenray, william wu)
   sparse matrix/vector
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: sparse matrix/vector  (Read 588 times)
ONS
Newbie
*





   


Gender: male
Posts: 41
sparse matrix/vector  
« on: Apr 17th, 2010, 6:33am »
Quote Quote Modify 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: male
Posts: 13730
Re: sparse matrix/vector  
« Reply #1 on: Apr 17th, 2010, 7:05am »
Quote Quote Modify 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
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board