[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] number of nodes
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] number of nodes |
Date: |
Wed, 25 Nov 2009 22:06:02 +0100 |
The memory for the igraph_t data structure is never allocated here.
You need to declare the graph as
igraph_t graph;
and then supply &graph to igraph functions. Or, if you want the
igraph_t to be allocated on the heap, then allocate memory for it with
malloc.
G.
On Wed, Nov 25, 2009 at 9:17 PM, Roberto Pagliari <address@hidden> wrote:
> the code I used is this
>
> int main(void) {
> igraph_t *graph;
> FILE *myfile;
> igraph_vector_t *membership;
> igraph_vector_t *weights;
> igraph_vector_t *initial;
> igraph_vector_bool_t *fixed;
> int num_nodes;
> myfile = fopen("europe.gml", "r");
> igraph_read_graph_gml(graph, myfile);
> num_nodes = igraph_vcount(graph);
> // printf("number of nodes: %f\n", igraph_vcount(graph));
> // igraph_community_label_propagation(graph, )
> fclose(myfile);
> return 0;
> }
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> UNIL DGM
- Re: [igraph] number of nodes, (continued)
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/24
- Re: [igraph] number of nodes, Gang Su, 2009/11/24
- Re: [igraph] number of nodes, Gábor Csárdi, 2009/11/25
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/25
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/25
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/25
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/25
- Re: [igraph] number of nodes, Tamas Nepusz, 2009/11/25
- Re: [igraph] number of nodes, Gábor Csárdi, 2009/11/25
- Re: [igraph] number of nodes, Tamas Nepusz, 2009/11/25
- Re: [igraph] number of nodes,
Gábor Csárdi <=
- Re: [igraph] number of nodes, Roberto Pagliari, 2009/11/24