commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <>
Subject Re: [math] RealLinearOperator and AbstractRealMatrix
Date Wed, 13 Jul 2011 16:30:39 GMT

And frankly, this makes huge since.  A linear operator is a generalization
of a matrix which should have *fewer* details than a matrix.  Having
implementation details of the linear operator dictate function of the matrix
is perverse.  Likewise, having any operation in the linear operator be final
is similarly perverse since over-riding of linear operator operations is
*exactly* what is expected.

My guess is that the final declarations came out of an attempt to avoid
warnings by over zealous code inspectors that allowing getters and setters
of private fields to be over-ridden is dangerous.  The warning is correct.
 The response was not.  The correct response is to not have the private
fields and make the getters and setters be abstract.

On Wed, Jul 13, 2011 at 9:04 AM, Phil Steitz <> wrote:

> My recommendation would be to follow the model of
> AbstractRealMatrix: a) no instance fields for dimensions b) abstract
> dimension getters c) protected constructor that just checks positivity.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message