[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Question on max id node
From: |
Gabor Csardi |
Subject: |
Re: [igraph] Question on max id node |
Date: |
Mon, 10 Mar 2008 10:52:54 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Richard, this is quite strange indeed. I've just tried read_graph_ncol
with various graphs and it seems to work fine. Could you send
me a small file that reproduces the strange results?
Btw, is this the 0.5 version?
Thanks,
G.
On Sun, Mar 09, 2008 at 06:22:42PM -0400, Richard Geddes wrote:
> Well, initially I imported an edgelist with
>
> igraph_read_graph_edgelist(&graph, input_file, 0, false);
>
> and ran
>
> igraph_community_fastgreedy(&graph, NULL, &merges, &modularity);
>
> and got normal results.
>
> Then, to get at the graph attributes, I attached the C attribute handler:
>
> igraph_i_set_attribute_table(&igraph_cattribute_table);
>
> 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?
>
> Thanks
> Richard
>
> 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
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> UNIL DGM
- [igraph] Question on max id node, Richard Geddes, 2008/03/09
- Re: [igraph] Question on max id node, Tamas Nepusz, 2008/03/09
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/09
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/09
- Re: [igraph] Question on max id node,
Gabor Csardi <=
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/10
- Re: [igraph] Question on max id node, Gabor Csardi, 2008/03/10
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/10
- Re: [igraph] Question on max id node, Gabor Csardi, 2008/03/10
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/10
- Re: [igraph] Question on max id node, Gabor Csardi, 2008/03/11
- Re: [igraph] Question on max id node, Richard Geddes, 2008/03/11