[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] random generator graph in C
From: |
wassim gmail |
Subject: |
Re: [igraph] random generator graph in C |
Date: |
Tue, 03 Nov 2009 13:44:10 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Gábor Csárdi a écrit :
2- I want to browse my graph generated to computes somes properties for each
vertices. How can i dot it ?
I am not sure what you mean by 'browsing' your graph.
Thank you for your replay. In fact i want to use the igraph to test a
scheme of allocation address in network. So here what i do i generate my
random graph and then i took every vertice and i compute one address.
But the problem i can't browse my graph vertices's.
Also i have another problem; here's the code i have written (what is look):
struct noeud{
unsigned int adress;
int already_have_adress;
};
int main()
{
igraph_t topology;
igraph_vector_t neighbor;
int id,i;
int size_network=19531; //big network
struct noeud reseau[size_network];
for(i=0;i<N;i++) {
reseau[i].monprime=0;
reseau[i].already_have_adress = 0;
}
// allocation for first nod vertice
reseau[0].address = 15
reseau[0].already_have_adress = 1;
igraph_grg_game(&topology, N, 30, 0, 0,0);
igraph_vector_init(&neighbor, 1);
for (id=0; id < size_network; id++) {
igraph_neighbors(&topology, &neighbor, id, IGRAPH_ALL);
for (i=0; i<igraph_vector_size(&neighbor); i++) {
if ( reseau[i].already_have_adress == 1 ) //to not compute
twice for the same vertice
continue;
computes_adress(VECTOR(neighbor)[i]);
}
}
}
but here i get an error like this:
Error at vector.pmt:409 :cannot reserve space for vector, Out of memory
Is there a solution for this ?
Another question is that every time i called the function
igraph_vector_init(), does it erase the last structure or does it
concatenate teh previous one and this is why i have this out of memory ?
Thank you for your help
- [igraph] random generator graph in C, alex, 2009/11/03
- Re: [igraph] random generator graph in C, Gábor Csárdi, 2009/11/03
- Re: [igraph] random generator graph in C,
wassim gmail <=
- Re: [igraph] random generator graph in C, Gábor Csárdi, 2009/11/03
- Re: [igraph] random generator graph in C, wassim gmail, 2009/11/03
- Re: [igraph] random generator graph in C, Gábor Csárdi, 2009/11/03
- Re: [igraph] random generator graph in C, wassim gmail, 2009/11/03
- Re: [igraph] random generator graph in C, Gábor Csárdi, 2009/11/03
- Re: [igraph] random generator graph in C, wassim gmail, 2009/11/03
- Re: [igraph] random generator graph in C, Gábor Csárdi, 2009/11/03
- [igraph] random generator graph in C, wassim gmail, 2009/11/06
- [igraph] Re: random generator graph in C, Gábor Csárdi, 2009/11/07
- [igraph] Re: random generator graph in C, wassim gmail, 2009/11/07