[
https://issues.apache.org/jira/browse/MATH-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793488#comment-13793488
]
Phil Steitz commented on MATH-1004:
-----------------------------------
Sorry, Gilles, I was not clear enough. What I agreeing with was the proposal
to add an inverse(RealMatrix) method to MatrixUtils that would handle any
RealMatrix, throwing only if the matrix is singular or non-square. This method
would essentially replace what used to be in RealMatrix itself, but which users
now have to get a decomposition solver to do, or use the block matrix version
you reference. It would include a default solver-based implementation (which
one?), but first check if the matrix is diagonal (using instanceOf) and if so,
inline or delegate to the impl for diagonal matrices.
I agree with you that we should not clutter the Utils classes, which is why I
was ambivalent on exposing the DiagonalMatrix version itself. I think it is a
good idea though to make a general inverse method available so people just
wanting an inverse don't have to search around to figure out the decomp solver
API. I know the blockInverse method is already there; but it is really a
specialized implementation and requires an additional parameter, so I would be
+1 to add a simple, general-purpose method.
> Inversion of diagonal matrix
> ----------------------------
>
> Key: MATH-1004
> URL: https://issues.apache.org/jira/browse/MATH-1004
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Ajo Fod
> Priority: Minor
> Attachments: MATH-1004.patch
>
>
> This should be a very easy feature to add and has many applications.
--
This message was sent by Atlassian JIRA
(v6.1#6144)