igraph-help
[Top][All Lists]
Advanced

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

[igraph] Generate Cluster graph in C


From: wassim gmail
Subject: [igraph] Generate Cluster graph in C
Date: Fri, 13 Nov 2009 17:25:02 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

To create a cluster graph, i have done as follow:

    igraph_t topology;
    igraph_bool_t network_connected = 0;
while (network_connected == 0) {
       igraph_grg_game(&topology, 100, 0.2, 0, NULL, NULL);
       igraph_is_connected(&topology, &network_connected, IGRAPH_STRONG);
   }

   igraph_vector_t membership; igraph_vector_init(&membership, 1);
   igraph_vector_t csize;             igraph_vector_init(&csize, 1);
   igraph_integer_t no ;

   igraph_clusters(&topology, &membership, &csize, &no, IGRAPH_WEAK);
printf("membership:%ld .. csize= %ld .. no=%d\n", igraph_vector_size(&membership), igraph_vector_size(&csize), (int) no);

but the problem is that the last function returns me always only 1 component (cluster) with all vertex ?
Is there any problem ? Why i can't have many cluster ?






reply via email to

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