commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [math] "equals" in "Vector3D"
Date Tue, 28 Apr 2009 20:55:20 GMT
> Among the definitions that are commonly used, you will find:
> 
> L1 norm: equals(a, b, tolerance) = sum(abs(a-b)) < tolerance
> L2 norm: equals(a, b, tolerance) = sqrt(sum((a-b)^2)) < tolerance
> L-infinity norm: equals(a, b, tolerance) = max(abs(a-b)) < tolerance
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I was thinking of that one. [Actually, I use it in unit tests...]

[The L2-norm is already available through the "distance" method.]


Gilles

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


Mime
View raw message