igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Generate Cluster graph in C


From: Gang Su
Subject: Re: [igraph] Generate Cluster graph in C
Date: Fri, 13 Nov 2009 11:56:32 -0500
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Hi Wassim,

You are forcing network to be connected in your random graph gen algorithm.
the igraph_clusters is used to find connected components in your graph. So no wonder, you always have 1 cluster.
To find communities, you need to use community algorithms.

Gang


wassim gmail wrote:
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 ?




_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help







reply via email to

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