OjAlgo

Last updated
OjAlgo
Original author Anders Peterson
Stable release
v56.1.1 / November 9, 2025 (2025-11-09)
Operating system Cross-platform
Type Library
License MIT License
Website ojalgo.org

oj! Algorithms or ojAlgo, is an open source Java library for mathematics, [1] [2] linear algebra and optimisation. It was first released in 2003 [3] and is 100% pure Java source code and free from external dependencies. Its feature set make it particularly suitable for use within the financial domain.

Contents

Capabilities

It requires Java 8 since version v38. As of version 44.0, the finance specific code has been moved to its own project/module named ojAlgo-finance. [3]

Usage example

Example of singular value decomposition:

SingularValue<Double>svd=SingularValueDecomposition.make(matA);svd.compute(matA);MatrixStore<Double>U=svd.getQ1();MatrixStore<Double>S=svd.getD();MatrixStore<Double>V=svd.getQ2();

Example of matrix multiplication:

PrimitiveDenseStoreresult=FACTORY.makeZero(matA.getRowDim(),matB.getColDim());result.fillByMultiplying(matA,matB);

References

  1. Takaki, M.; Cavalcanti, D.; Gheyi, R.; Iyoda, J.; d’Amorim, M.; Prudêncio, R. B. (2010). "Randomized constraint solvers: a comparative study". Bioinformatics. 6 (3): 243–253. doi:10.1007/s11334-010-0124-1. S2CID   11050378.
  2. Vanek, O.; Bosansky, B.; Jakob, M.; Pechoucek, M. (2010). Transiting areas patrolled by a mobile adversary. Symposium on Computational Intelligence and Games. pp. 9–16.
  3. 1 2 "oj! Algorithms Project Page". oj! Algorithms. Retrieved July 2, 2013.