Hi,
I'm in the middle of porting LSQR (iterative solver for unsymmetric
systems) to Commons-Math. I need to be able to define a "transposable"
real linear operator. In other words, on top of
RealVector RealLinearOperator.operate(RealVector),
I also need a method which would read
RealVector RealLinearOperator.operateTranspose(RealVector).

My problem is: how to do that?
1. Extend RealLinearOperator? That would allow for compile time
checks. The problem is I've already defined
InvertibleRealLinearOperator. So how about operators which are both
invertible and transposable?
2. Create an interface, say Transposable? But then, no compile time
check can be performed in
LSQR.RealVector solve(RealLinearOperator a, RealVector b)
(defined in AbstractIterativeLinearSolver). The only thing I can do is
test whether the specified operator implements the interface
Transposable.
3. Add the method operateTranspose to RealLinearOperator, and allow
for UnsupportedOperationException. I could then add a method
boolean isTransposable() to RealLinearOperator. Again, no compile-time
check is possible.

Do you have any thoughts?
Sébastien


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

Reply via email to