On 08/14/2011 08:53 AM, tamo wrote:
t = gt.trust_transitivity(g, trust, *source=None, target=None*) print t.a
seems that deg_sampler of random_graph function (i.e., lambda: (poisson(3), poisson(3)) ) is required to my loaded graph how do I solve this and let the trust_transitivity function works with the loaded graph?
Everything is working as it is supposed to. The difference is that if you pass source=None and target=None, the trust value between _all pair_ of vertices is returned. This means that the value type of the property map is a _vector_ instead of a scalar, so it cannot be accessed by the ".a" attribute. You have to use vertex descriptors,
v = g.vertex(10) print t[v]