-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C interface to vinecopulib #389
Comments
I don't know about Julia, but regarding the other two:
|
Re pyvinecopulib, there are two main issues:
|
Yeah, |
Thanks for the comments. I'll just add some additional thoughts on based on my experiences writing Python, Julia and MATLAB wrappers to C and C++ code.
I can certainly help with the Python interface and Julia interface if that is of interest. Also, unfortunately, I'm much more familiar with C than C++, so there's that (and maybe that's where my bias for having a C interface is coming from). At the moment, I'm interested in a Julia interface to |
Many thanks for the input @kdheepak. I had a brief look at the hourglass pattern; it sounds quite interesting and might be something we want to do in the future. At least for our R interface, C++ was way easier than taking a detour to C, though. In any case, we're happy about any help we can get. If you want to contribute anything specific, just let us know. P.S.: We will presumably resume working on the Python interface during a short hackathon in July. |
OK, so we worked recently on the Python interface: pyvinecopulib. It turned out that exposing directly the C++ classes was also much easier than the detour to C. Essentially, the whole interface was written in slightly less than 600 lines, basic documentation included. Now, the reason is that the OOP way in which vinecopulib is implemented was straightforward to translate to Python. For pyvinecopulib, we used pybind11, which is very similar to the "legacy" Boost.Python. For Julia, it is probably quite easy to mimick what we did using CxxWrap, as explained https://github.com/JuliaInterop/CxxWrap.jl#whats-the-difference-with-cxxjl. The R interface required comparatively more work, as we not only exposed stuff from C++, but rather wrote a full API that feels more like what R users are accustomed to. I think that the Julia equivalent would be Cxx.jl. |
Are there any plans to write a C interface for vinecopulib? C++ is great for this sort of stuff, but writing code in Python/Julia/MATLAB that link to vinecopulib is going to be very challenging if the functions are just exposed in C++. It would be very easy to write these interfaces if commonly used functions were exposed using CDECL. Thoughts?
The text was updated successfully, but these errors were encountered: