[C++-sig] [Graph] Getting PageRank to work in BGL-Python
John Reid
j.reid at mail.cryst.bbk.ac.uk
Fri Dec 7 10:39:59 CET 2007
Brian wrote:
> >>> bgl.page_rank(a,a.add_vertex_property('float') )
I think this gives you a vertex property called 'float' of type
'object'. You probably want
a.add_vertex_property(name='my_name', type='float')
See the add_vertex_property docstring:
add_vertex_property(self, name='', type='object') -> GraphVertexPropertyMap
However I still get a 'did not match C++ signature' error with this
change so there must be something else as well.
It does seem to work on directed graphs:
dg = bgl.Digraph()
bgl.page_rank(dg, dg.add_vertex_property('float'))
HTH,
John.
More information about the Cplusplus-sig
mailing list