0

I want to develop an application that will use mathematical programming to solve lp problems ( http://en.wikipedia.org/wiki/Mathematical_optimization ) . I used for several years lp solve in c# and even in java...I was wondering if there are some libraries developed specifically for android that will help me to do that. Does anybody know some good and possibly free library?

Thanks,

Andrea

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
jiraya85
  • 428
  • 1
  • 5
  • 26
  • If you used jar libraries in Java they should also work in Android development. Add them to a project as you would do in a Java project. – Bandreid Apr 06 '12 at 08:57
  • thanks...I've just tried Cream ( http://bach.istc.kobe-u.ac.jp/cream/ ) and seems to work perfectly. Thank you very much! – jiraya85 Apr 06 '12 at 09:57

1 Answers1

2

If you used jar libraries in Java they should also work in Android development. Add them to a project as you would do in a Java project. A brief explanation below.

Best way to add External Jars to your Android Project or any Java project is:

  • Create a folder call 'libs' into you project root folder

  • Copy your Jar files to the lib folder

  • Now right click on the Jar file and Build Path > Add to Build Path, this will create a folder called 'Refrenced Library' into you project, and your are done

Now whenever you transfer you project, you will not have dependencies issues.

Also you can refer to this answer for a good math optimization library which can be used with Java or Android: Linear Algebra Library For Android

Community
  • 1
  • 1
Bandreid
  • 2,727
  • 28
  • 47
  • 1
    Actually, the folder must be called `libs`, otherwise, the ant build of the project will be broken. See [here](http://tools.android.com/recent/dealingwithdependenciesinandroidprojects) for changes in ADT17. If the library is put into this folder, the java build path gets updated automatically. – Stefan Hanke Apr 06 '12 at 10:18
  • @Stefan Hanke ugh, right you are... I missed that. Thank you for the correction. – Bandreid Apr 06 '12 at 10:19
  • Thanks for your help, I have just accepted your answer. Thanks also for the suggestion of Jama, but this is a mathematical library, not very good to solve linear programming problems. I would suggest to use LP solve or Cream instead, because they have a strong sets of methods that can be very useful and you do not need to recreate the simplex alghoritm. Thank you for everything! – jiraya85 Apr 20 '12 at 08:04
  • Thank you for the suggestions. I was searching for a library that would help me improve my code, especially trough vectorization. – Bandreid Apr 20 '12 at 09:49