phcerdan / wolfram_model

Python Wrappings for exploring Set Substitution Systems (Wolfram Models)
https://www.wolframphysics.org
MIT License
15 stars 8 forks source link

Add python wrapping #2

Closed phcerdan closed 4 years ago

phcerdan commented 4 years ago
Uses pybind11/stl.h automatic wrapping.
This has the limitation than its not possible to pass by reference, and
that makes copies all around. But it provides the more pythonic
interface.

In the future, would be great to use pybind11/stl_bind.h (not compatible with
stl.h) that makes the stl containers OPAQUE to python. Python will
consider them as a specific type. The good thing is no copies will be
made, the problem is that we have to develop a better interface with
existing python, such as list, numpy arrays, etc.

Do not make this a priority until we discover that there is a performance
bottle neck using pybind11/stl.h or the interface is clunky because
the no-references limitation.