|Subject:||Re: [igraph] Question on max id node|
|Date:||Sun, 09 Mar 2008 18:22:42 -0400|
|User-agent:||Thunderbird 184.108.40.206 (X11/20080227)|
Well, initially I imported an edgelist with |
igraph_read_graph_edgelist(&graph, input_file, 0, false);
igraph_community_fastgreedy(&graph, NULL, &merges, &modularity);
and got normal results.
Then, to get at the graph attributes, I attached the C attribute handler:
imported the edgelist with:
igraph_read_graph_ncol(&graph, input_file, NULL true, false, IGRAPH_UNDIRECTED);
and ran the community function on the graph and I get different results...
when importing with igraph_read_graph_edgelist, 11 nodes and 19 edges are reported are reported.. which is correct,
however when importing with the igraph_read_graph_ncol function, 19 nodes and 19 edges are reported.
Am I using igraph_read_graph_ncol correctly?
Richard Geddes wrote:
Thanks. Looks like what I was looking for. Tamas Nepusz wrote:Hi Richard,Is there a function that provides the value of the largest node id in the imported graph?If you are using C (I assume you do), try to attach the C attribute handler and then read your graph using igraph_read_graph_ncol (this is for the NCOL format which is practically a named edge list). This is able to store the vertex names used in the NCOL file as a vertex attribute. After that, you can scan the attribute values to find the largest one. See http://cneurocvs.rmki.kfki.hu/igraph/doc-0.5/html/ch09s02.html for the usage of the C attribute handler._______________________________________________ igraph-help mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/igraph-help
|[Prev in Thread]||Current Thread||[Next in Thread]|