[ https://issues.apache.org/jira/browse/MATH-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030834#comment-13030834 ]
Luc Maisonobe commented on MATH-569:
------------------------------------
This is possible only for negate() in the FieldElement interface. Not all fields support sqrt or pow. A typical example is Fraction, the square root of a fraction may not be a fraction for example.
This is exactly this limitation that explains while only LU decomposition is implemented for fields and not other decomposition algorithms.
One possibility would be to add an ExtendedFieldElement interface that would add these methods for the fields that support it (Complex, Dfp ...). Then, we could add new decomposition algorithms that would work on these extended fields (but still not on simpler fields like fraction.
> Add more operators to FieldElement
> -------------------------------------
>
> Key: MATH-569
> URL: https://issues.apache.org/jira/browse/MATH-569
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.0
> Reporter: Arne PlĂ¶se
> Priority: Minor
>
> it would be nice to have some additional operators in FieldElement i.e.
> T negate();
> T pow(T x);
> T sqrt();
> maybe the double variant i.e.
> T pow(double x);
> as well.
> This would be affect FieldVector | Matrix, BigReal, ... as well.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira