When I'm initializing a new DMatrixRMaj in ejml (standard format for real matrix), it can store internally a double[][] matrix. Example
double[][] a = new double[][];
//init a
DMatrixRMaj d = new DMatrixRMaj(a);
//math operations on d
now, after the necessary calculations, how I can obtain back a double[][] form of d? With d.getData() i can only obtain the row form. I've also tried wrapping in SimpleMatrix, or creating a SimpleMatrix from doubles, but I haven't find any methods (or matrix format) to retrieve doubles back!
Do you know how I can do it? Or can you suggest a straigthforward workaround without having to write a personalized function?
I am not very familiar with the library, but considering matrix is stored using
data[ y*numCols + x ] = data[y][x]format, you could write your own function to retrieve data using the same format.Example:.