On 01/12/2012 12:28 PM, Sébastien Brisard wrote: > Hi Thomas, [snip]
> I agree with you that any linear operator is "transposable" (don't > even know whether this word makes sense in english). However, > RealLinearOperator have been implemented for operators which are *not* > known in closed-form. In other words, I do not know how to access > efficiently the (i, j) coefficient, but I *do* know how to compute > efficiently A.x. There might be some cases where computing A'.x would > still be difficult. I do not have an example here, but that's the > reason why initially > RealVector operateTranspose(RealVector) > was not put in the RealLinearOperator abstract class. ok, now I understand the purpose of the operator much better. >> @Alt1: you ask about operators which are both invertible and >> transposable, but the two properties do not collide imho, at least as >> long as you do not want to calculate something like y = A^T^-1 x >> > That's true. So are you suggesting I should write three specialized classes > InvertibleRealLinearOperator, > TransposableRealLinearOperator, > InvertibleAndTransposableRealLinearOperator? not really, I think such a structuring would create more confusion and problems in the long run than make up for the subtle differences that it may model right now. >> And in that case, wouldn't it be better to create a RealLinearOperator >> object with A^T as parameter? >> > Not sure I really follow, but I already thought of passing *two* > RealLinearOperators to the LSQR solver, which requires A and A^T. that's pretty much what I was thinking about ;-) > I've actually started playing around with this option. Added > RealVector operateTranspose(RealVector) > to the RealLinearOperator abstract class. This method would be defined > as "optional" in the Javadoc, with the option to throw an > UnsupportedOperationException. I also thought about > boolean isTransposable() > to check at execution time that operateTranspose() has indeed been > implemented. Not sure this method is absolutely necessary, though. Together with the comment from Ted, I think this is the best way to go. The isTransposable method may not be needed after all, I would be happy with a checked exception in case someone uses operateTranspose and it is not supported by the operator. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org