[ https://issues.apache.org/jira/browse/MATH-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054160#comment-13054160 ]
Gilles commented on MATH-581: ----------------------------- What I really meant above is that all that is needed is 2 abstract base classes and nothing more (especially: no interface definition). Thus, "LinearOperator" should not be there. Concerning the code formatting: * Some lines are misaligned. * You should remove "meta-comments" such as {noformat} //@formatter:off {noformat} * IMHO, you should avoid using HTML entities; it makes the comment quite unreadable: {noformat} * | x<sup>T</sup> · A · y - * y<sup>T</sup> · A · x | * ≥ ε, {noformat} In Javadoc, I think that we should stick to ASCII, and if explanations that contain elaborate mathematical formulae are needed, they should go in the separate user guide. Additionally: * The exception classes are missing an accessor for the "offending vector". * It's not necessary to copy the arguments passed to the exception constructor. * The "LocalizedFormats" message template is missing info on the offending vectors (and maybe the operator but I think that it isn't possible, right?). We should certainly use the "ExceptionContext" to pass on this info. I can take care these last points. {quote} For testing purposes, it would be convenient indeed to have RealMatrix derive from RealLinearOperator, {quote} I don't know why you need that. Anyways it is not backward-compatible and will potentially entails quite a few other changes. Turning "RealMatrix" into an abstract class is the way to go but it certainly needs a JIRA ticket. You are welcome to raise the issue. What we can do in the meantime is to make "AbstractRealMatrix" inherit from "RealLinearOperator". Would that be OK for your purpose? > Support for iterative linear solvers > ------------------------------------ > > Key: MATH-581 > URL: https://issues.apache.org/jira/browse/MATH-581 > Project: Commons Math > Issue Type: New Feature > Affects Versions: 3.0, Nightly Builds > Reporter: Sébastien Brisard > Labels: iterative, linear, solver > Attachments: MATH-581-01.patch, linearoperator.zip > > > Dear all, > this issue has already been discussed on the forum. The idea is to implement > the most popular linear iterative solvers (CG, SYMMLQ, etc...) in > commons-math. The beauty of these solvers is that they do not need direct > access to the coefficients of the matrix, only matrix-vector products are > necessary. This is goof, as sometimes it is inetficient to store the > coefficients of the matrix. > So basically, before implementing the iterative solvers, we need to define an > interface slightly more general than a matrix, namely LinearOperator, with > only one basic operation: matrix-vector product. > Here are a few interfaces and abstract classes that do that. Nothing fancy > yet, I just wanted to have you advice on the implementation before I commit > some solvers. > I thought these classes could go in a package > org.apache.commons.math.linearoperator, but really, I haven't got a clue... > Best regards, > Sebastien -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira