commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <>
Subject Re: [math] RealMatrixFormat.parse()
Date Thu, 31 Dec 2015 17:10:54 GMT
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 

> 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 
format and the instance type could be optimized for space, but a 
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

> 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).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message