igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] : Simplify() use


From: Gábor Csárdi
Subject: Re: [igraph] : Simplify() use
Date: Sun, 16 Nov 2014 00:06:01 -0500

On Sun, Nov 16, 2014 at 12:00 AM, patricia <address@hidden> 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: address@hidden
>> To: address@hidden
>> 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
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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