Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How can i align a sparse matrix.assemble values by their row & column

input = int[,] sparse = new int[,] { { 4, 4, 2 }, { 3, 3, 2 }, { 1, 1, 4 } };

output = int[,] sparse = new int[,] { { 4, 4, 2 }, { 1, 1, 4 }, { 3, 3, 2 } };
Posted
Updated 13-Jan-13 9:39am
v2
Comments
Sergey Alexandrovich Kryukov 13-Jan-13 22:44pm    
What do you mean my "align", anyway? There is no such thing; and matrices do not have any certain graphical representation...
—SA

1 solution

These matrices are not sparse.
See http://en.wikipedia.org/wiki/Sparse_matrix[^] for further clarification.
Cheers
Andi
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Jan-13 22:42pm    
My 5. First glance at the code sample, and the question: how are they sparse? :-)
—SA
Andreas Gieriet 14-Jan-13 2:01am    
Thank you for your 5!
Andi

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