Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-833

Redundancy in number formatting classes.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 4.X
    • None
    • None

    Description

      1. 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.
      2. 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.
      3. Some functionality is totally redundant: Formatting a "Vector3D" should be strictly equivalent to formatting a "RealVector" with 3 elements.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erans Gilles Sadowski
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: