igraph-help
[Top][All Lists]
Advanced

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

[igraph] Fast sum of nodes attributes


From: Matheus Viana
Subject: [igraph] Fast sum of nodes attributes
Date: Mon, 24 Nov 2014 09:10:34 -0800

Hi all.

I would like to know if there is any fastest way to sum the attribute "MyAttribute" of all nodes, other than that:

double sum = 0.0;
for (node = igraph_vcount(&Graph); node--;) {
sum += VAN(&Graph,"MyAttribute",node);
}

Many thanks,

Matheus Viana
Postdoctoral Research Employee
Developmental and Cell Biology
University of California Irvine



reply via email to

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