![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 852
Rep Power: 4
![]() |
Do a google search for sparse matrix multiplication - the third link (http://www.eecs.harvard.edu/~ellard/...ot/node20.html gives you a pretty description and some C code you could change to suit your node structure.
|
|
|
|
|
|
#12 |
|
Hobbyist Programmer
Join Date: Mar 2006
Posts: 120
Rep Power: 3
![]() |
I am stuck in coding a function removenode to remove a node.
I want to have the prototype as void removenode(intr, int c) I dont know how to link the remaining nodes after removing the specific node. it can be tricky since there is not necessary a node next to it. can I have some help? |
|
|
|
|
|
#13 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 852
Rep Power: 4
![]() |
It should be the same as any normal linked list node removal, except that there are two linked lists (the row list and the column list). Find the node in each of the linked lists and keep track of the previous node. When you have found the node, link the previous node's next pointer to the next pointer of the found node.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| linked list problems | bl00dninja | C++ | 6 | Feb 17th, 2008 10:30 AM |
| Problem with generics | Jimbo | Java | 1 | Feb 23rd, 2006 2:27 AM |
| C# - LinkedList Issues | technocraze | C# | 1 | Jul 14th, 2005 1:46 AM |
| queue implementation problems | epswing | C | 6 | Apr 20th, 2005 3:44 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |