🚀 High Performance Linear Algebra OOP
Clone or download
Pull request Compare This branch is 54 commits ahead of fommil:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status Coverage Status Maven Central Javadoc


MTJ is a high-performance library for developing linear algebra applications.

See matrix-toolkits-java for the original library.

This fork is just a minor extension to cover the case of general matrices. The symmetric case was already covered in ArpackSym. The new class is ArpackGen. It uses ARPACK's dnaupd and dneupd routines for the Implicitly Restarted Arnoldi Iteration.

Sparse Solvers

MTJ provides ARPACK for very large symmetric matrices in ArpackSym (see the example usage in ArpackSymTest). ARPACK solves an arbitrary number of eigenvalues / eigenvectors.

In addition, implementations of the netlib Templates are available in the no.uib.cipr.matrix.sparse package.

Users may wish to look at Sparse Eigensolvers for Java for another solver.


  • Copyright (C) 2003-2006 Bjørn-Ove Heimsund
  • Copyright (C) 2006-2014 Samuel Halliday


This project was originally written by Bjørn-Ove Heimsund, who has taken a step back due to other commitments. The original project matrix-toolkits-java is maintained by Samuel Halliday.


Releases are distributed on Maven central:


Example Code

   // check out test class in SparseEigenvalueTest:
   CompColMatrix m = createRandomMatrix(10,15); // create a random
   ArpackGen generalSolver = new ArpackGen(matrix);
   Map<Double, DenseVectorSub> eigenValueMap = generalSolver.solve(3, ArpackGen.Ritz.LR); // get 3 largest eigenvalues
   double largestARPACKEigenValue = eigenValueMap.keySet().iterator().next();


Contributors are encouraged to fork this repository and issue pull requests. Contributors implicitly agree to assign an unrestricted licence to Sam Halliday, but retain the copyright of their code (this means we both have the freedom to update the licence for those contributions).