Closed m0nzderr closed 9 years ago
Hi m0nzderr,
thanks for reporting this. Yeah, the docs are wrong.
So internally I'm using column major (column by column) because that is what Fortran expects, but when you do the nested double[][] thing, it just looks like filling in the data row after row, so this is why there's a difference.
-M
Not a big deal, but a bit confusing bug, either in a code or in docs.
According to your javadoc, we got the following API:
DoubleMatrix(int newRows, int newColumns, double... newData) saying: "DoubleMatrix(m,n, [value1, value2, value3...]) Values are filled in row by row."
So, I expected the following test to pass, but it didn't:
The output is:
[1,000000, 3,000000, 5,000000; 2,000000, 4,000000, 6,000000] [1,000000, 2,000000, 3,000000; 4,000000, 5,000000, 6,000000]
It looks like DoubleMatrix(m,n, [value1, value2, value3...]) is filled "column by column" instead. "Column by column" may also make some sense, since for example, Matlab does so in memory, but I didn't expect such behavior here ;)
Thanx!
P.S: I uses jblass-1.2.3 from maven.