commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <>
Subject Re: [math] Exceptions for matrix operations
Date Wed, 11 May 2011 04:18:15 GMT
So we are more or less back to my initial proposition (see corresponding 
To sum up, we will define a new interface, called LinearOperator (should 
we make it RealLinearOperator? That would be consistent with the 
hierarchy AnyMatrix/RealMatrix), with the following methods
   +- void operate(double[] x, double[] y)
   +- int getDomainDimension()
   +- int getCodomainDimension()

NOTA: I thought that operate(x, y) should *not* create the vector y = 
A.x, in order to avoid memory allocations for very large data sets. Is 
it a good idea?

Regarding exceptions, we would have two new exceptions
   +- double[] getFirstOffendingVector()
   +- double[] getSecondOffendingVector()
   +- double getThreshold()

   +- double[] getOffendingVector()
   +- double getThreshold()

Since LinearOperator no longer extends AnyMatrix (or any daughter 
classes), I no longer feel the need to create a base exception from 
which NonAdjointLinearOperator and NonSymmetricMatrix would be derived. 
What do you think? Same goes to NonPositiveDefinite LinearMap/Matrix.

Thanks for this very constructive discussion. I now need to work on my 
code before I can submit it.
Best regards,

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

View raw message