[graph-tool] elaboration please: remove_vertex_if&find_vertex

Tiago de Paula Peixoto tiago at skewed.de
Sun Aug 14 10:39:02 CEST 2011

On 08/14/2011 08:53 AM, tamo wrote:
>>> t = gt.trust_transitivity(g, trust, *source=None, target=None*)   
>>> print t.a 
> None
> 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]


Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20110814/7201c2d9/attachment.asc>

More information about the graph-tool mailing list