Click here to Skip to main content
12,077,753 members (49,174 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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 13-Jan-13 10:34am
Edited 13-Jan-13 10: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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

These matrices are not sparse.
See http://en.wikipedia.org/wiki/Sparse_matrix[^] for further clarification.
Cheers
Andi
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160212.1 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100