Wednesday, December 26, 2012

la4j-0.3.0 is out!

I am proud to announce that la4j-0.3.0 is ready for download now.

Here is release notes for version 0.3.0. BTW, this is the lagest changelog in the history of project.
  • la4j got new API and new package naming (starting with "org.la4j.*")
  • la4j has been moved from Google Code to GitHub;
  • la4j uses Travis-CI;
  • la4j available through Maven now;
  • support of new matrices types (Basic1DMatrix, CCSMatrix);
  • new I/O API and format - Symbol Separated Stream (CSV, TSV, etc.);
  • new la4j entities: matrix/vector sources, matrix/vector functors;
  • la4j uses default unchecked exceptions from java.lang.* now;
  • the code has been formated according to JavaCodeConv;
  • support of unsafe accessors and arithmetic methods;
  • support Eigenvalues decomposition for non-symmetric matrix;
  • new fast matrix-to-matrix multiply algorithm with blocks;
  • new algorithm for runtime-based machine epsilon initialization;
  • fixed several major/critical bugs;
If you like la4j-0.3.0, please drop me a note in twitter: @vkostyukov


PS: I've decided to use Google Code Downloads for the hosting of binary files. The main reason for this is available out-of-the-box download counter. I want to see the output of my work.


  1. Hi.

    So like many others, I´m also on the lookout for a stable matrix library and I came across your implementation.

    A couple questions.

    1) Are there any performance comparison tests available against other matrix libraries?

    2) Is it possible to use other primitive data types besides double arrays? The reason I ask is because I´m doing some OpenGL development and I think I might need to support matrix operations over integers and floats.

    It´s nice to see well coded libraries arise. ;)

    Thank you for your time.

  2. Hi,

    First of all thank you for the interest to my work. Here are my answeres bellow:

    1) There is a It compares the performance of various java matrix libraries including la4j. So there are a performance results at the wiki of project you can use. Unfortunately, this benchmarks checks the previous version of la4j (0.2.0) not the current. I'm actually, in the middle of preparing new wrappers for version 0.3.0. I'm going to send it to the benchmark author when it'll be ready. I guess, the new version of la4j a quite faster then the previous one. It has new fast matrix-to-matrix multiply implemenation, unsafe accesors, new fast matrix structure (1D array) and etc. I hope it'll show the better performance.

    Any way, the next changes I'm going to do with la4j is performance improvements. I work with following principles:

    a) Make it works
    b) Make the code looks good
    c) Mate it fast

    I'm currently at the 'b' step.

    2) It is possible to use integer vlues in matrices in case if you implemented a new matrix class, like IntegerMatrix (implements DenseMatrix extends AbstractMatrix). But there is a issue - matrix interface already has double accessors. Anyway, I'cant see the huge difference between float/int and double (it could be performance issues). You always can cast double values to float/int using static cast for example. BTW, you can write you own matrix round function (RoundFunction implements MatrixFunction, see functors exmaples here and use "matrix.transform(MatrixFunction function)" method to round any matrix you want. I mean there're a lot ways to perform the matrix round using features of la4j.