oj! Algorithms

oj! Algorithms – ojAlgo – is Open Source Java code to do mathematics, linear algebra and optimisation. It’s what you need for data science, machine learning and scientific computing.

High Performance on a Rich Feature Set with Zero Dependencies

  1. ojAlgo is the fastest pure Java linear algebra library available. That statement is backed by the latest Java Matrix Benchmark results – a third party independent benchmark (not written by anyone associated with ojAlgo).
  2. Optimisation (mathematical programming) tools including LP, QP and MIP solvers – again, pure Java with zero dependencies.
  3. A collection of “array” classes that can be sparse or dense and arbitrarily large. They can be used as 1-, 2- or N-dimensional arrays, and may contain a multitude of different number types including complex numbers, rational numbers and quaternions. The memory for the arrays can alternatively be allocated off heap or in a file. The linear algebra part of ojAlgo builds on these arrays – they’re fast and efficient.
  4. A growing collection of utilities for data science, including Artificial Neural Networks, clustering and tools for reading, writing and processing data.
  5. Various other things like time series, random numbers, stochastic processes, and descriptive statistics.

Design Concepts

  • Code for the JVM. No calls to native (C or Fortran) libraries. ojAlgo is primarily a Java library, but Android, Kotlin, Scala, Groovy and Clojure programmers are successfully using ojAlgo.
  • No dependencies. Nothing besides a JDK is needed to compile or execute the code.
  • Code that scales. ojAlgo is fast because it is resource efficient (machine-aware), and that’s what enables scaling up.
  • Evolving API. ojAlgo is a mature code library, but constantly evolving. Improving ojAlgo often includes evolving the API – anything may change in the future.

Get Started

Add ojAlgo as a Maven dependency. The current release is 57.0.0 — see Maven Central for all versions.

<dependency>
    <groupId>org.ojalgo</groupId>
    <artifactId>ojalgo</artifactId>
    <version>57.0.0</version>
</dependency>

Get the source

The source code is part of the documentation — you are strongly encouraged to read it. The repository lives at github.com/optimatika/ojAlgo. Clone it with:

git clone https://github.com/optimatika/ojAlgo.git

Or fork it on GitHub, browse issues, or join a discussion. ojAlgo is released under the MIT License.