Numerical operations, random number generation, numerical instabilities

From OTBWiki
Revision as of 18:27, 2 February 2012 by Jonathan guinet (Talk | contribs) (Random number generation)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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