Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
Please give me a idea to solution my homework: "the way to store Sparse matrix"
Thanks you very much!
Posted
Updated 7-Apr-11 15:41pm
v2

In addition to other answers, you can also use std::map[^] container in order to implement an efficient Sparse Matrix. Have a look at this implementation[^]. :)
 
Share this answer
 
Try Linked List.

Sample to go ahead: How to store sparse matrix as a Linked List[^]
 
Share this answer
 
You may also use hash tables for that. For instance, Lua tables (that are 'hybrid' hash tables) provide an efficient way to represent sparse matrix.
 
Share this answer
 
Why we used Link list? It is better when we used array?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900