commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [math] RealLinearOperator and AbstractRealMatrix
Date Thu, 14 Jul 2011 22:39:29 GMT
On Thu, Jul 14, 2011 at 11:17:50AM -0700, Ted Dunning wrote:
> This sort of need is actually common in my experience.
> On Thu, Jul 14, 2011 at 9:37 AM, Phil Steitz <> wrote:
> >  Currently, none of the implementations support this,
> > but nothing in the currently defined RealMatrix / AbstractRealMatrix
> > API prevents subclasses from adding an addRows method, or such a
> > method being added to Array2DRowRealMatrix.

If rows/columns can be added, then the object is obviously mutable; in this
case, I agree that keeping the dimensions in the base class is not good
(since it would require that the subclass updates those fields whenever they
change, and this is less optimal than overriding the accessors).

In this case, however, I don't understand the recommendation to provide a
constructor (as in "AbstractRealMatrix") that checks the dimensions but is
otherwise empty...


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

View raw message