On Sun, Nov 16, 2014 at 12:00 AM, patricia <souza302...@hotmail.com> wrote:
> I draw two vertices randomly between 0 and (number of samples -1) then put
> those positions in an array and then add these positions to the undirected
> graph.     Example: was drawn vertices 10 and 55, then I add these positions
> to a vector named after these vertices and edges (10 and 55) are added to
> the graph undirected manner (igraph_add_edges (& net, & degree, 0)).

So you are essentially creating a G(n,m) graph. You can create one by
simply calling igraph_erdos_renyi_game:
http://igraph.org/c/doc/igraph-Generators.html#igraph_erdos_renyi_game
Set type to IGRAPH_ERDOS_RENYI_GNM

This generated a simple graph, so no need for simplify.

Then you can list the edges that you have in the graph, with
igraph_get_edgelist:
http://igraph.org/c/doc/igraph-Structural.html#igraph_get_edgelist and
add their weights as well, based on your external list.

Right?

Gabor

>
>> Date: Sat, 15 Nov 2014 23:22:48 -0500
>> From: csardi.ga...@gmail.com
>> To: igraph-help@nongnu.org
>> Subject: Re: [igraph] : Simplify() use
>
>>
>> [...]
>> > 1) give away a pair of vertices and connect them with weights defined by
>> > the
>> > similarity between the samples, which was calculated previously;
>>
>> What does "give away" mean? You "consider" a pair of vertices? What is
>> the order of the pairs in which you consider them?
>>
>> G.
>>
>> [...]
>>
>> _______________________________________________
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> _______________________________________________
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

_______________________________________________
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to