Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linear Programming library for iOS

I am looking for an iOS library that enables solving LP, IP, BIP, MIP for an application I am developing. I've found GLPK but have no idea how to compile it for iOS, and after searching the web for some time, I did not find anything interesting... I'd appreciate if someone can help me how to compile GLPK for iOS or either knows of some open source LP solver for iOS.

like image 865
Edgepo1nt Avatar asked Oct 19 '12 18:10

Edgepo1nt


1 Answers

I used GMP (GNU Multiple Precision Arithmetic Library) for iOS development, what is basically a C based static library for various mathematical purpose. I had to do calculation on a big matrix, so I needed a library that support arbitrary precision. I installed it with MacPorts. MacPorts is a terminal based package management system on Mac, like yum or apt on Debian. After you installed the appropriate static library as I installed GMPL with "sudo port install gmp", after that you can check out in Xcode the static library under "Link Binary With Library" section. Press the "Add Other.." button, go the the /opt/local/lib folder, this is the default installation folder for MacPorts, and check out your static library. Add some header to your code, and voila, you can do your computations.

In the picture below you can see libgsl as well, that is the GNU Scientific Library, I would recommend it too.

enter image description here

like image 194
János Avatar answered Oct 13 '22 11:10

János