[
https://issues.apache.org/jira/browse/MATH-863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460333#comment-13460333
]
Sébastien Brisard commented on MATH-863:
----------------------------------------
A good test would be {{FieldLUDecomposition}}. It might work, it might not. But
even if it works, it would not tell us much. Indeed, we would have to make sure
that _all_ classes operating on {{FieldElement}} take into account
non-commutativity of the multiplication. There is no way to check that!
I can give you a counter example (not included in Commons-Math) : I've
developed a {{Polynomial<T extends FieldElement<T>}} with coefficients as
{{FieldElement}}s. Then I expand {{(a + b)^n}} using Pascal's rule [1]. While
this is perfectly correct on a regular field, it would certainly fail on a
{{Quaternion}} (if I understand correctly). If {{Quaternion}} implemented
{{FieldElement}}, applying Pascal's rule would be allowed from the point of
view of the compiler, although pure nonsense from a mathematical point of view.
Therefore, I think {{Quaternion}} *should not* implement {{FieldElement}}. Did
I miss something? What do others think?
[1] {{(a + b)^2 = a^2 + a * b + b * a + b^2 != a^2 + 2 * a * b + b^2}} if {{*}}
does not commute.
> new Quaternion class added in complex package
> ---------------------------------------------
>
> Key: MATH-863
> URL: https://issues.apache.org/jira/browse/MATH-863
> Project: Commons Math
> Issue Type: New Feature
> Affects Versions: 3.1
> Reporter: Julien Anxionnat
> Attachments: quaternion.patch, quaternion_v2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> This patch provides a new class for the mathematical object "Quaternion" in
> the complex package.
> This quaternion is considered as a mathematical object (the Hamilton's
> hypercomplex number).
> Note that it's not a rotation quaternion which has to be a quaternion of norm
> one. Although this feature could be used for a getter in the Rotation class.
> This patch provides also some improvements in Precision class : a "double
> comparison epsilon" and a method to compute relative comparison.
> (Please, note that's it's my first contribution, and I apologize in advance
> for my mistakes…)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira