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

Inconsistent behaviour of constructors in ArrayRealVector class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: