igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Vertex from an edge


From: Alvaro Graves Fuenzalida
Subject: Re: [igraph] Vertex from an edge
Date: Thu, 18 Jun 2009 14:50:22 -0400
User-agent: Postbox 1.0b12 (Macintosh/2009051120)

Yes, but, I want to do something with each specific sum, so if I have nodes A, B and C with scores 1, 2 and 3 respectively and all connected I want to say that edge A-B is 2+1 = 3, edge B-C is 2+3=5 and edge A-C is 1+3=4

Thanks in advance.


Gábor Csárdi wrote:
I mean the sum of this, i.e.

sum(degree(g) * V(g)$attribute)

G.

On Thu, Jun 18, 2009 at 8:02 PM, Gábor Csárdi <address@hidden> wrote:
Hi,

that is basically summing the attribute for each node as many times as the degree of the node, isn't it?

So it is just

degree(g) * V(g)$attribute

Best,
Gabor


On Thu, Jun 18, 2009 at 7:38 PM, Alvaro Graves Fuenzalida <address@hidden> wrote:
Hi,

I'm using the R version of igraph and a was wondering how to do the following: For each edge, I need to take the values of each node (stored in an node's attribute) and sum them but is not clear to me how to use the nodes from an edge. I assume is something related to E(g) but I couldn't find what other parameter.

Thanks in advance.






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



--
Gabor Csardi <address@hidden>     UNIL DGM




--
Gabor Csardi <address@hidden>     UNIL DGM


_______________________________________________ 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]