5

In the Python world, if I have some number crunching to do, I use NumPy and it's friends like Matplotlib.

Now I have an Android/Java application and the need arises to crunch some numbers and I am wondering what I should do. Roll my own wrappers around Arrays of Floats?!? That sounds horrible. I want something more high-level.

Operations that I would need to perform are typical vector-scalar or vector-vector operations:

  • find the maximum element in a vector
  • calculate the sum of all elements in a vector
  • dot/cross/element-wise product of two vectors

Later I might be interested in advanced operations like FFT or matrix operations, but right now I am looking for a solid basic library to prevent me from reinventing the wheel.

Any suggestions?

1
  • 1
    Did you try Googling java linear algebra library? Commented Jun 23, 2017 at 18:57

3 Answers 3

3

The nd4j.org API tries to mimic the semantics of Numpy, Matlab and scikit-learn. deeplearning4j.org is based on nd4j.

1
2

NM Dev is a Java numerical library (commercial, community and academical licenses ).

The open source of it is available at: https://github.com/nmdev2020/SuanShu

1
  • Can you point out the relevant features requested in the question?
    – Alejandro
    Commented Aug 8, 2020 at 15:11
0

There are a number of Java numerical libraries.

Please see here for an overview: http://www.ee.ucl.ac.uk/~mflanaga/java/OpenSourceNumeric.html

(I don't have the reputation to post more than 2 links, so just linking to the page containing the links.)

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.