This is related to this question. I have a very large graph, on the order of 100,000 vertices in igraph. Each vertex has an attribute att
which is a logical value. Edges are weighted with positive integer weights. For each vertex v, I would like to sum the edge weights of edges that connect v
to a vertex where att=T
.
We can use the following as an example
set.seed(42)
g <- erdos.renyi.game(169081, 178058, type="gnm")
V(g)$att <- as.logical(rbinom(vcount(g), 1, 0.5))