You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Rob Tompkins (JIRA)" <ji...@apache.org> on 2017/04/12 11:03:41 UTC

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

     [ https://issues.apache.org/jira/browse/MATH-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Tompkins updated MATH-833:
------------------------------
    Fix Version/s: 4.X

> 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
>             Fix For: 4.X
>
>
> # 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 was sent by Atlassian JIRA
(v6.3.15#6346)