igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] help with graph.union.by.name


From: Gábor Csárdi
Subject: Re: [igraph] help with graph.union.by.name
Date: Sat, 15 Nov 2014 10:53:30 -0500

On Thu, Nov 6, 2014 at 4:55 AM, Umberto Medicamento
<address@hidden> wrote:
> Thanks Gabor, I tried graph.union in Igraph 0.7.1., setting byname="auto",
> since the graphs have a "name" attribute.
>
> It keeps the edge weight and it generates:
>
> IGRAPH DN-- 99 638 --
> + attr: name (v/c), weight_1 (e/n), weight_2 (e/n)
>
> quoting the Igraph manual "If an attribute is present in multiple graphs and
> would result a name clash, then this attribute is renamed by adding
> suffixes: _1, _2, etc."
>
> What exactly does the function? How can I get a unique weight attribute in
> my final graph?

Combine weight_1 and weight_2 as you wish. If they are always the
same, just rename weight_1 to weight, and remove weight_2.

> Also, if run graph.union setting byname=FALSE, the number of nodes in the
> final graph changes.
>
> IGRAPH D--- 94 928 --
> + attr: name_1 (v/c), name_2 (v/c), weight_1 (e/n), weight_2 (e/n)
>
> Could you explain me, what does it mean? When byname is set FALSE, operation
> is performed on symbolic vertex names instead of the internal numeric vertex
> ids. Hence, I suppose I should aspect this different result, correct?

I am not sure what you mean here, please show an example.

Gabor

[...]



reply via email to

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