igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] about input file for igraph_clusters( )


From: Yi Cao
Subject: [igraph] about input file for igraph_clusters( )
Date: Tue, 29 Mar 2011 18:35:26 -0400

Hello everyone,

      Now I get an input edge-list file for a bipartite graph. There are two columns of numbers, with each column representing one vertices set of the bipartite graph, let's say the first column is set A, and the second column is set B. The format of the file (the file is .txt format) is as follows:

                            A        B
                             .         .
                             .         .
                             .         .
                             6        7
                             6        8
                             9        10
                             9        11
                             9        12
                             9        13
                            14       15
                            14       16
                            14       17
                            18       19
                             .          .
                             .          .
                             .          .

      Now I want to know exactly  the component id for each vertex in set A and the corresponding component size.  Because the igraph_cluster( )store the component id for each vertex in  membership and the component size in csize, I need to pick out the component ids and corresponding size for vertices in set A from vector membership and component size. Before I can do this, I need pick out and record the vertices id in set A. So, I was trying to write a piece of code to do this for me, but I got stuck with this. Anyone gets some ideas about this? big thanks.   by the way, I use c++.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]