Friday, May 6, 2011

Programming and Doing Matrix Algebra in Java

Java is a great programming language. I really appreciate the enormous efforts that were made in making programmer life better, and the elegance of the Object Oriented programming, as compared to the procedural way of thinking I was used to.
Java is special for that being incredibly large the number of things that should be managed for its professional use. A possible workflow for learning it, is presented here (pay attentions to looping links).

At the very end  most of the core work I have to do, is to do linear algebra. Recently the Mathematical Libraries for Java grew many and interesting.   Information can be found in Wikipedia at the List of Numerical Libraries (but most of the links do not work, you have to google the names).


.
Among the libraries cited there, recently we used the Parallel Colt in the work by Francesco Serafin. The merit of the page Parallel Colt was also to bring my attention on the theory of what I was looking for, and especially to the CSparse book by Tim Davis, and to the Golub work, and book.

A comprehensive overview of Java Matrix Packages is given at the Java-Matrix.org.
A comparison of Matrix packages performance was made here but a test with our tools will be necessary, sooner or later.  UJMP is the only one of all the packages that also has a companion paper that tries to describe the design of the library. For me a great add-value.  Also la4j seems promising. Both la4j and UJMP seems to be currently updated, while other efforts are more or less quiescent (including Parallel Colt).

I also observe that a possible use of new features of Java 8 could be of some interest for matrix multiplication. However the most informed answers suggested to cope with ready-made work.

Before doing anything, remeber that for many problem Apache Commons, as well as the more specialised Math Commons and the Google Guava library already have a solution.

A lot to learn indeed.

1 comment:

  1. There are many simple introductions to Java. Many are also on-line. This is one I like: http://www.tutorialspoint.com/java/index.htm

    ReplyDelete