The title says most of it.

I'm looking for a lightweight and easy-to-use library that I can use for Android (NDK) projects.
For dense stuff I like using Eigen but I haven't found many comprehensive (and documented!) libraries for sparse stuff that "just work" in a project.

PETSc seems a little heavy with all these MPI things but that's only my first impression. Any suggestions?

  • $\begingroup$ What languages can android apps be written in? $\endgroup$
    – Dan
    Commented Jan 21, 2012 at 22:35
  • 1
    $\begingroup$ Java or C++ or both combined (which is the recommended way). $\endgroup$
    – rsp1984
    Commented Jan 24, 2012 at 14:44

2 Answers 2


You could try building CSparse, which seems to have no dependencies other than the C standard library, judging from the source. (You can strip out the MATLAB interface, or just not build it.) Other routines on Tim Davis' sparse linear algebra algorithms web site may also have few or no dependencies (for instance, you can build UMFPACK using its internal BLAS library instead of an external high-performance BLAS implementation).


Yousef Saad's Sparskit has no dependencies just a bunch of simple Fortran routines.

Though Fortran on Android can be hard. For start see here.

Other option is to use the simple routines that come with the book "Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods" available here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.