How can I optimize vector normalization in a Molecular Modeling program?
Paul Hughett
hughett at mercur.uphs.upenn.edu
Tue Nov 9 15:17:10 EST 1999
In comp.lang.c Xiaohui Xue <xue at julian.uwo.ca> wrote:
: Instead of l^2 norm, use l^1 norm in your normalization and relevant
: computation.
: For vector {x_n},
: l^2 norm of {x_n} = sqrt( x(1)^2 + x(2)^2 + .... + x(n)^2 ), which
: involves multi and sqrt in the computation.
: l^1 norm of {x_n} = (abs(x(1)) + abs(x(2)) + ... + abs(x(n))), the
: computation of which is simplified.
: In addition, l^1 norm is equivalent to l^2 norm in a strong sense.
The l^1 and l^2 norms are equivalent topologically but not geometrically.
This application is probably geometrical and _requires_ the l^2 norm;
though it's worth looking to see if some approximation to sqrt or the
l^1 norm is good enough.
Paul Hughett
More information about the Molmodel
mailing list