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.

-- 
Tiago de Paula Peixoto <ti...@skewed.de>



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to