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

Inconsistent behaviour of constructors in ArrayRealVector class

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      ArrayRealVector(double[] d) allows to construct a zero-length vector, but ArrayRealVector(double[] d, boolean copyArray) doesn't. Both should allow this as zero-length vectors are mathematically well-defined objects and they are useful boundary cases in many algorithms.

      This breaks some arithmetic operators (addition) on zero-length real vectors which worked in 2.0 but don't work in 2.1

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rwerp Roman Werpachowski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: