[vtkusers] Meaning of vtkAdjacencyMatrixToEdgeTable output

Benoist Laurent benoist at ibpc.fr
Tue Aug 31 12:18:54 EDT 2010


Several assumptions:
     - the initial value 0 of your table is not stored.
     - the rows are given in inverse order of entry

The first column is therefore the column index of your matrix.
It results in


20  30  40
10  20  30
     10  20
--------------------
0   1   2    column index



So the pair is (column_index, value).
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!).

Am I wrong ? Am I clear ? Does it answer your question ?

Benoist


Le 31 août 10 à 17:47, David Doria a écrit :

> Can anyone explain the output of this?
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Graphs/AdjacencyMatrixToEdgeTable
>
> The input array that I pass it is:
>
> 0 10 20
> 10 20 30
> 20 30 40
>
> and the output is:
>
>
> +-----------------+------------------+
> |                 | value            |
> +-----------------+------------------+
> | 2               | 20               |
> | 1               | 10               |
> | 2               | 30               |
> | 1               | 20               |
> | 0               | 10               |
> | 2               | 40               |
> | 1               | 30               |
> | 0               | 20               |
> +-----------------+------------------+
>
> The first column clearly has something to do with the row and column
> in the adjacency matrix (0 - 2, since it is a 3x3 matrix), but I don't
> understand what the pairs in this table indicate? For example, what is
> (2, 20)?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100831/dbfba479/attachment.htm>


More information about the vtkusers mailing list