commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
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 <phil.steitz@gmail.com> 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...


Regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message