commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [math] Exceptions for matrix operations
Date Wed, 11 May 2011 04:18:15 GMT
Great!
So we are more or less back to my initial proposition (see corresponding 
wiki).
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
LinearOperator
   +- 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
NonAdjointLinearOperator
   +- double[] getFirstOffendingVector()
   +- double[] getSecondOffendingVector()
   +- double getThreshold()

NonPositiveDefiniteLinearMapException
   +- 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,
Sebastien


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


Mime
View raw message