Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sparsematrix

Status
Not open for further replies.

vintl

Technical User
Jun 9, 2000
72
0
0
MY
anyone know or do before this sparsematrix before? <br>i got a couple of question..like how to implement it with template.
 
Dear vinctl,<br><br>I see no one has responded to your post. I am not familiar with the term 'sparsmatrix' could you clairify?<br><br>Could you also clarify your use of 'implement it with template'. Are you refering to C++ templates?<br><br>-pete
 
sparseMatrix is a matrix that has many 0 in it.<br>eg.<br>sparseM&nbsp;&nbsp;&nbsp;&nbsp;r c v r-rows<br>1 3 0&nbsp;&nbsp;&nbsp;-&gt; 1 1 1 c-cols<br>0 0 0&nbsp;&nbsp;&nbsp;-&gt; 1 2 3 v-value<br>0 0 1&nbsp;&nbsp;&nbsp;-&gt; 1 3 1<br><br>convert the sparse matrix in to the rows , cols and with the values.<br>using C++ template.<br>i have alreadydo the print,trace, and element funct but it return some run-time errors. anyone can check for my source? pls include ur email so i can send it to you.
 
Dear vinclt,<br><br>I am truly sorry but I can not understand your post.<br><br>-pete
 
Tell me the exact question... <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
 
Send me the code to decode...<br><A HREF="mailto:methane@personal.ro">methane@personal.ro</A>
 
Sparse matrix is one which consists of many
zero's in it. To reduce the memory we will convert
the matrix as sparse matrix.

E.g:- 1 0 0
0 2 0
3 0 0
The sparse mtarix for the above is
row cloumn value
1 1 1
2 2 2
3 1 3

For more details refer Data Structures book
by Horowitz sahani.
Thank U very much for giving this opportuinity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top