Deformable registration in D

Saaa empty at needmail.com
Fri Aug 3 00:14:48 PDT 2007


>> Exp with finite support, how does this go?
>
> The support of a function is basically the range in which its non-zero. 
> See http://en.wikipedia.org/wiki/Support_(mathematics) for more details. 
> I'm specifically using it to calculate the Gaussian, which is essentially 
> exp(-x) where x > 0 (x is a distance). So I have a few small x's which 
> become relatively large exp(-x) and many large x's that become really tiny 
> exp(-x). By approximating all those large x's (tiny exp(-x)) with zero 
> (i.e. making the support finite) I don't have to calculate as many exp 
> functions, which speeds up the computation.

Thanks for you reply.
Thus your gauss function will simply check something like:
if (x>18) return 0;

I see how this effects the speed ;)
(if only int are accepted as input I would just put all 18 of them in there 
:D) 





More information about the Digitalmars-d-announce mailing list