Hi Bill,

>
> And, it is much worse than that.  Pretty much nobody cares about ebe, but
> dotProduct and outerProduct also assume that 0*NaN = 0 and 0*+-Infinity = 0.
> e.g.:
>  RealVector a = new OpenMapRealVector(100000);
>  RealVector b = new OpenMapRealVector(100000);
>  a.setEntry(1, 1.0);
>  b.setEntry(2, Double.NaN);
>  double prod = a.dotProduct(b);
>  assert(prod == 0.0);
>
> The OpenMapRealVector class is already so incredibly slow.  I really can't
> see maintaining support for it if it has to handle these edge cases as well.
>

Thanks for spotting this. I am in the middle of refactoring all unit
tests for RealVector, and haven't reached dotProduct() yet, so haven't
had the opportunity to reveal this bug.
I think the question you raise is legitimate. Gilles already
questioned in a recent post the support for this class.

What do the others think?

Sébastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to