Documentation
ojAlgo is documented three ways: the API reference on javadoc.io, the source itself, and the posts on this site. This page is the curated reading order through the posts — the ones that are still the best explanation of their topic, grouped so you can start where your problem is.
The example code behind every post is maintained — it is compiled and kept current with each ojAlgo release, so what you copy from a post works with the current version even where the surrounding prose reflects the version it was written for. All of it is collected on the Code Examples page.
Start here
- Get started — the Maven dependency and where the source lives.
- Frequently Asked Questions — the recurring questions, answered properly. Read this before opening an issue.
- Common Mistake — the most common way ojAlgo ends up slow: converting to and from
double[][]instead of using its own data structures. - Updating Old ojAlgo Code — old class and method names that no longer compile (
Variable.make,PrimitiveMatrix,PrimitiveDenseStore…) and what to write instead. - Changelog — what changed in every release.
Optimisation
Read the Java LP, QP and MIP Solvers page first for what the solvers are and how ExpressionsBasedModel separates the model from the solver. Then:
- Optimisation Cookbook — complete, runnable models for nine common problem shapes, from production planning to facility location. If you have a problem to solve, start from the closest recipe.
- The Diet Problem — a first LP, formulated and solved end to end.
- The McNuggets Challenge — a first MIP: integer variables and what they change.
- Model and Solve the Traveling Salesman Problem — a harder MIP, with subtour elimination.
- MIP Strategy Configuration — how to steer the integer solver when the default strategy is not the right one.
- Gomory Mixed Integer Cuts — what cuts are and how the
IntegerSolveruses them. - Optimisation Model File Formats — reading and writing MPS, LP and EBM files. Note: since v57.1 ojAlgo also writes LP and MPS files, and detects the format from the file name; the post predates this.
- Using the Optimisation Service — solving an
ExpressionsBasedModelremotely, and deploying your own server with native solvers behind the same code. - Hooking Your Solver to ojAlgo — how to make any solver usable from
ExpressionsBasedModel. This is how the solver integrations are built. - LP, QP & MIP on the JVM and the benchmarks — how the built-in solvers compare with the alternatives, on public test sets.
Linear algebra
Read the Linear Algebra page first. Then:
- Linear Algebra Introduction — the matrix types, how to create and combine them, and the decompositions.
- Sparse and Special Structure Matrices — the
MatrixStoreimplementations, and how to write one that exploits your matrix’s structure. - Generalised Eigenvalue Problems — the generalised forms and how to set them up.
- Iterative Solver Comparison — Jacobi, Gauss–Seidel and Conjugate Gradient for linear systems.
- StatQuest PCA Example, Image Processing using SVD and using FFT — worked examples of the decompositions and transforms.
Arrays, data and performance
- Working With Arrays — the array classes: dense, sparse, off-heap and file-backed, in one to N dimensions.
- 1BRC using ojAlgo — the one billion row challenge with those arrays.
- Introducing BatchNode — processing a dataset too large for memory, in stages.
- Controlling Concurrency — how to limit or direct ojAlgo’s multithreading.
- The Memory Estimator — estimating the footprint of an object graph.
Finance and machine learning
- The Financial Mathematics page, then Financial Time Series Data and GARCH.
- Artificial Neural Network Example v2 — the current neural network API, in one example. Mall Customer Segmentation — clustering.
Everything else
The full archive has every post, and Code Examples has every example program. If something here is wrong or missing, Discussions is the place to say so.