<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Several assumptions:</div><div> - the initial value 0 of your table is not stored.</div><div> - 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 </div><div><br></div><div><br></div><div><font class="Apple-style-span" face="Courier">20 30 40 </font></div><div><font class="Apple-style-span" face="Courier">10 20 30</font></div><div><font class="Apple-style-span" face="Courier"> 10 20</font></div><div><font class="Apple-style-span" face="Courier">--------------------</font></div><div><font class="Apple-style-span" face="Courier">0 1 2 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>| | value |<br>+-----------------+------------------+<br>| 2 | 20 |<br>| 1 | 10 |<br>| 2 | 30 |<br>| 1 | 20 |<br>| 0 | 10 |<br>| 2 | 40 |<br>| 1 | 30 |<br>| 0 | 20 |<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>