Is it possible to work with legacy structures

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to work with legacy structures

Anton Daneyko
I am currently working with a code that has a directed graph structure: an object defines `inputs` and `outputs` which return iterables of the objects with the same interface. Each object has a bunch of useful payload. I am looking for a python libarary that is capable of handling such data structure without the conversion to an intermediate format that is loaded for graph processing algrorithms. 

So instead of walking the data structure I have and converting it to a list of lists or whatever representation is consumed by the graph library, I would specify an adaptor interface to my own class so the graph library would be able to interact with my hierarchy directly. Is this sort of thing possible?

Best regards,
Anton

_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to work with legacy structures

Tiago Peixoto
Administrator
On 20.11.2017 15:30, Anton Daneyko wrote:
> So instead of walking the data structure I have and converting it to a list
> of lists or whatever representation is consumed by the graph library, I
> would specify an adaptor interface to my own class so the graph library
> would be able to interact with my hierarchy directly. Is this sort of thing
> possible?

No. Graph-tool has its own internal C++ data structure which is exposed via
Python. However, all algorithms operate on the internal data structure, so
they cannot be used on other ones defined in Python, even if they are
derived from the exposed class.

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>