-
Notifications
You must be signed in to change notification settings - Fork 46
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
Interface to GLPK #437
Comments
There certainly are! You can start with one of the GSL modules (that live in If you need help, please email one of the PDL mailing lists! |
Thanks for encouraging! Did some investigations in the meantime, but I'm not sure about the proper path. The GLPK interface is rather complex, but re-inventing the Octave interface doesn't seem to be a good idea neither. Need some time to think it over. There is an outdated Math::GLPK module that I couldn't get to work and there is Inline::Octave where its author gave up to bind liboctave with perl. |
If you like the Octave interface, then mimic that instead! If I were doing it myself, I'd start either with the OO approach outlined above, or a very literal translation of the C interface, like the GSL binding, but I'm not, so you do what you feel suitable. |
After some PP warmup: Configuration options are still missing and the function cannot broadcast. I would extend this prototype to a full-fledged module if there were some principal acceptance for this stuff. It would be great if an PDL expert could take a look at the prototype. |
Added configuration parameters and documentation. My question to pdl-porters: May I publish this module unter the name |
On behalf of pdl-porters: yes, absolutely! I have some design/implementation thoughts I'll deal with below. But instantly, to go on CPAN you're going to need to ensure the user has GLPK installed, probably with Devel::CheckLib. See |
More detailed thoughts. I don't understand why This snippet caught my eye:
There are a number of ways to deal with this. The smallest is to do this error-check in HdrCode. I think a good way to go from Perl hashref to a C struct is to have a (large, here) number of OtherPars, and pass each of them in your _glpk_int(..., @$params{qw(msglev dual...)}); I've had in mind for a while to expand Your |
Thank you for your suggestions! Firstly, the function I'm not sure if I shall publish the module to CPAN in its current state. At least it is usable and documented. Reworking the error handling would change the interface, though. |
You've copied it from there, but now it's in your repo. That means you can change it. It doesn't have any C++ in. Please try deleting the
You can change the Octave code, because it's your code now. There isn't a problem as such, but conceptually I like to keep Perl stuff out of
If you have questions, please ask!
I'd say since it belongs entirely to you, and is so far only used by you, then any interface changes are fine? |
Thanks for your suggestions, that led me to some changes:
Thank you very much for your support! May I contact you if I have further questions? (Reopen the issue?) I'd like to close this issue as the basic goal was achieved. |
I support you leaving it open if you'd like, but also if you'd like to close it.
The best way to get support would be to join one or both of the Finally, |
Got it. Maybe I found a solution: Moving the PDL dependency into a a Regarding I'm going to subscribe the PDL mailing lists and think this issue shall be closed. Once again: Many, many thanks for your great support! |
From my wish list: Are there any chances to have an interface from PDL to GLPK as easy as in Octave? See https://www.gnu.org/software/glpk/ and https://docs.octave.org/latest/Linear-Programming.html
The text was updated successfully, but these errors were encountered: