![]() |
|
#1
|
|||
|
|||
Sparse Matrix multiplicationHelp me in multiply two Sparse Matrices
|
|||
|
#2
|
|||
|
|||
Re: Sparse Matrix multiplicationQuote:
So, if you want to multiply two sparse matrices, first you, somehow, come up with two sparse matrices. In other words, the approach to efficient multiplication of sparse matrices depends (almost) entirely on the precise pattern of sparsity. I mean, there's sparse, and then again there's sparse. 1. What is your assignment? 2. What is it about your assignment that you don't you understand and for which you have some expectation of assistance from a general programming help forum? 3. It could happen (your getting assistance here), but you have to show us something before there is a ghost of a chance that we can show you anything! Regards, Dave Last edited by davekw7x : 02-May-2007 at 23:14.
|
|
#3
|
|||
|
|||
Re: Sparse Matrix multiplicationI have already created a sparse matrix using linked list.
Now I'm trying to multiply those matrices. Help me in writing the algrithm. |
|
#4
|
|||
|
|||
Re: Sparse Matrix multiplicationQuote:
In the first place, there are lots of people (well, at least one, and probably more) who would like to help you implement whatever algorithm you decide to use. (That is: to make a program that uses that algorithm to solve your problem.) As far as "writing the algorithm": I hate to repeat myself, but Quote:
I'm not sure that "sparsity" is a word, but I hope you get the idea. Just saying that you have two lists of non-zero matrix element values (and, I assume, their positions in their respective matrices) doesn't give any information at all about how to approach the problem of multiplying the matrices represented by the lists. So: What is your assignment? (But I asked that already, didn't I.) If you have absolutely no information about a pattern of sparseness, then just create two matrices corresponding to the sizes of the matrices represented by the lists. Initialize the matrices with all zeros, and then put in the values from your lists. Then multiply the matrices "normally", using the definition of matrix multiplication. In this case the property of "sparseness" is no help in reducing in the amount of time required to multiply the matrices or the amount of memory required when they are being multiplied, but might reduce the amount of storage required for each one when it is not being operated on. Regards, Dave |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C++ Matrix | bengaluke | C++ Forum | 7 | 03-Feb-2007 22:38 |
| i need help in C++ PLZ | its_me | C++ Forum | 3 | 04-Dec-2006 22:51 |
| how to initialize a char matrix matrix with empty elements? | swedenguy | C Programming Language | 4 | 22-Aug-2006 12:43 |
| how to initialize a char matrix matrix with empty elements? | swedenguy | C Programming Language | 1 | 22-Aug-2006 12:15 |
| Combining Vectors and References | Frankg | C++ Forum | 7 | 14-Jan-2006 07:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The