When we define a new property we provide the type of its values:
vprop_vint = g.new_vertex_property("vector<int>")
Is there some way to obtain this type from the property object, for example when properties are included in a graph read from a .gt.gz file?
(I hope this is not already somewhere in the documentation…)
Thanks in advance
tiago
(Tiago Peixoto)
November 16, 2015, 10:55pm
#2
Yes, it is already in the documentation. (Hint: _every_ function and
object in the library is documented.) Just look at the documentation for
PropertyMap:
https://graph-tool.skewed.de/static/doc/graph_tool.html#graph_tool.PropertyMap
What you want is the PropertyMap.value_type() method.
Best,
Tiago