commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Commented: (MATH-391) Inconsistent behaviour of constructors in ArrayRealVector class
Date Sun, 03 Oct 2010 01:56:33 GMT


Phil Steitz commented on MATH-391:

I agree that the code should be consistent.  I agree as well that a zero-dimensional vector
is legit.   Can anyone explain why ArrayRealVector(double[] d, boolean copyArray) requires
positive length?

> Inconsistent behaviour of constructors in ArrayRealVector class
> ---------------------------------------------------------------
>                 Key: MATH-391
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Roman Werpachowski
>             Fix For: 2.2
> 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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message