Am Donnerstag, 10. Januar 2019, 23:51:29 CEST schrieb Tiago de Paula Peixoto: > Am 10.01.19 um 13:48 schrieb Gerion Entrup: > > So my question is: Is it possible to get the C++ graph object out of the > > Python graph object? Is it possible to fill the C++ graph object > > directly with nodes and edges? > > This is possible, and not very difficult. However, it's undocumented at the > moment. > > I'm working on some documentation, and I'll release it soon. > > > Another point is that I need to attach a pointer (or shared_ptr) to a > > custom C++ type to some nodes. The pointer does not need to be > > accessible or visible from Python. Is this possible in a simple way? > > (Of course I can workaround with an e.g. map of type (vertex id, > > pointer).) > > You can either use a property map of type int64_t, which is enough to hold > pointers. You can also use type python::object, which will hold whatever you > can express in python, inclusive custom classes. > >
I have seen that you wrote some documentation [1]. Thank you! Gerion [1] https://graph-tool.skewed.de/static/doc/demos/cppextensions/cppextensions.html
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ graph-tool mailing list [email protected] https://lists.skewed.de/mailman/listinfo/graph-tool
