On Wed, 30 Dec 2015 21:33:56 -0600, Ole Ersoy wrote:
Hi,
In RealMatrixFormat.parse() MatrixUtils makes the decision on what
type of RealMatrix instance to return.
Ideally, this is correct as the actual type is an "implementation
detail".
Flexibility is gained if it
just returns double[][] letting the caller decide what type of
RealMatrix instance to create.
That could become a problem e.g. for sparse matrices where the
persistent
format and the instance type could be optimized for space, but a
"double[][]"
cannot be.
It's also better for modularity, as is
reduces RealMatrixFormat imports (The MatrixUtils supports Field
matrices as well, and I'm attempting to separate real and field
matrices into two difference modules).
For modularity, IO should not be in the same module as the core
algorithms.
Also just curious if Array2DRowRealMatrix is worth keeping? It seems
like the performance of BlockRealMatrix might be just as good or
better regardless of matrix size ... although my testing is limited.
I recall having performed a benchmark years ago and IIRC, the
"BlockRealMatrix" started to be more only for very large matrix size
(although I don't remember which).
Regards,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org