|
From: | Hermann Norpois |
Subject: | Re: [igraph] simplify and edge.attr.comb |
Date: | Sun, 24 Nov 2013 18:28:17 +0100 |
On Sun, Nov 24, 2013 at 11:57 AM, Hermann Norpois <address@hidden> wrote:You need to do _something_ with the weights, because you are merging
> Hello,
> I have an undirected graph g and I used
>
> g <- simplify (g)
>
> to remove multiple edges. The problem is that I dont find the correct
> syntax for edge.attr.comp. I want my weights (for E(g)$weight) not being
> altered. The weights should not be touched at all. I just want multiple
> edges to vanish.
multiple edges into a single one, and these edges potentially have
different weights. You cannot have them "not to be touched at all".
I see. So you are sure that multiple edges between two vertices always
> I tried
> g <- simplify (g, edge.attr.comb=list (weight=function (x) unique (x),
> name="ignore"))
have the same weight? Then this is a good solution.
Why?
> and it seems to work but I am not happy with it.
You can say weight="first" which is the same, if all the weights are
> Could you please help to ameliorate the _expression_?
the same, but how much better is that?
G.
> Thanks
> Hermann
>
> _______________________________________________
> 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
[Prev in Thread] | Current Thread | [Next in Thread] |