Numerical operations, random number generation, numerical instabilities

From OTBWiki
Jump to: navigation, search

Numerical operations

Since OTB uses VXL lib, we recommend the use of vnl and vcl operations for mathematics operation (for example vcl_exp instead of exp), for code homogeneity (vcl_exp is a redefinition of std::exp).

Random number generation

Mersenne Twister Random number generation is an efficient way to generate random number. MersenneTwisterRandomVariateGenerator class is available in ITK Statistics. You can visit the Mersenne Twister home page for further information about the algorithm. Matsumto article is available here.

Mersenne Twister Random number generation should be use instead of rand,vnl_random ....

Tests, which use random generation

random number generators are initialized using (random seed is set to 1, and Mersenne twister seed to 121212 ) in testing environment. the option -testenv had to be explicitly called to initialize seed for OTB Applications. vnl_rand seed is not set.

Numerical instabilities