I'm using Jeigen for representing matrices in Java (Jeigen is a wrapper for Eigen). The library is fast and easy but I'm missing one cool feature. As far as I see, Jeigen does not support exchanging columns or rows (e.g. operation on column and then replace column with new values). Jeigen only supports setting individual entries.
Does somebody have an efficient workaround for this? Setting each value in a column is inefficient (especially if the column is large).
Alternatively, perhaps EJML supports this. But with EJML I have the problem that it is not possible to easy and fast convert a SimpleMatrix to a 1D array.
EJML internally stores a matrix as a 1D array. For a example:
So it's trivial to get a 1D array out of EJML.