You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2012/07/29 14:32:34 UTC

[jira] [Created] (MATH-833) Redundancy in number formatting classes.

Gilles created MATH-833:
---------------------------

             Summary: Redundancy in number formatting classes.
                 Key: MATH-833
                 URL: https://issues.apache.org/jira/browse/MATH-833
             Project: Commons Math
          Issue Type: Task
            Reporter: Gilles
            Priority: Minor


# Many tests are repetitive. They are very tedious to modify in case the default format changes (as was the case in MATH-622).
Whenever one is testing the number part (be it an element of a vector, or of a matrix, or the real part of a complex number, or the imaginary part of a complex), the procedure for testing that, e.g. the truncation works as expected, is the same; there should be a way to not repeat the same strings of digits in every test class and every test method in those classes.
The tests should be rationalized in the perspective that the default format is changed again, to scientific notation.
# The formatting classes ("RealVectorFormat", "RealMatrixFormat", "VectorFormat", "Vector3DFormat") contain a fairly large amount of duplicate code.
We should look for a way to abstract the formatting of a number (be it an element of a vector, or of a matrix, or the real part of a complex number, or the imaginary part of a complex) from the rest of the string representation of the structure at hand.
# Some functionality is totally redundant: Formatting a "Vector3D" should be strictly equivalent to formatting a "RealVector" with 3 elements.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira