<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Several assumptions:</div><div>&nbsp;&nbsp; &nbsp;- the initial value 0 of your table is not stored.</div><div>&nbsp;&nbsp; &nbsp;- the rows are given in inverse order of entry</div><div><br></div><div>The first column is therefore the column index of your matrix.</div><div>It results in&nbsp;</div><div><br></div><div><br></div><div><font class="Apple-style-span" face="Courier">20 &nbsp;30 &nbsp;40 &nbsp; &nbsp; &nbsp; &nbsp;</font></div><div><font class="Apple-style-span" face="Courier">10 &nbsp;20 &nbsp;30</font></div><div><font class="Apple-style-span" face="Courier">&nbsp;&nbsp; &nbsp;10 &nbsp;20</font></div><div><font class="Apple-style-span" face="Courier">--------------------</font></div><div><font class="Apple-style-span" face="Courier">0 &nbsp; 1 &nbsp; 2 &nbsp; &nbsp;column index</font></div><div><br></div><div><br></div><div><br></div><div>So the pair is (column_index, value).</div><div>And the row index is given by the number of time you've ever seen the column index before (except for the 0 that increases the difficulty!).</div><div><br></div><div>Am I wrong ? Am I clear ? Does it answer your question ?</div><div><br></div><div>Benoist</div><div><br></div><br><div><div>Le 31 août 10 à 17:47, David Doria a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Can anyone explain the output of this?<br><br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Graphs/AdjacencyMatrixToEdgeTable">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Graphs/AdjacencyMatrixToEdgeTable</a><br><br>The input array that I pass it is:<br><br>0 10 20<br>10 20 30<br>20 30 40<br><br>and the output is:<br><br><br>+-----------------+------------------+<br>| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| value &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>+-----------------+------------------+<br>| 2 &nbsp;&nb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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>| 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 30 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>| 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 20 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>+-----------------+------------------+<br><br>The first column clearly has something to do with the row and column<br>in the adjacency matrix (0 - 2, since it is a 3x3 matrix), but I don't<br>understand what the pairs in this table indicate? For example, what is<br>(2, 20)?<br><br>Thanks,<br><br>David<br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br><br></div></blockquote></div><br></body></html>