On 03/05/2013 10:26 AM, Renato Fabbri wrote:
> I think I got it (even beforehand). I could not get the strength in a
> direct manner as
> I get the degree. I fell that is because I am not understanding something.

Weighted degrees are not built in. But you can get it with a simple loop:

    k = sum(w[e] for in v.out_edges())

In this case, the tip Abdo gave regarding storing in a property map may
com in handy, so you use the values again in the future:

    ks = g.new_vertex_property("double")
    for v in g.vertices():
        ks[v] = sum(w[e] for in v.out_edges())

>> Regarding the clustering coefficient, could you specify what it is that
>> you want to calculate?
>
> frac of numb of closed triads.

Without considering the weights? How is this different from the
traditional unweighted clustering coefficient?

> Cheers. Your detailed and helpful response was very appreciated.
> There is more info on what we are doing here:
> http://www.wiki.nosdigitais.teia.org.br/ARS
> and here:
> http://labmacambira.sourceforge.net/redes

Thanks for the references, and good luck with your project!

Cheers,
Tiago


-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to