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 [math] Transposable linear operators
Date Wed, 11 Jan 2012 19:21:49 GMT
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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message