21 #ifndef otbMRFOptimizerMetropolis_h
22 #define otbMRFOptimizerMetropolis_h
26 #include "itkNumericTraits.h"
27 #include "itkMersenneTwisterRandomVariateGenerator.h"
69 this->m_Parameters.SetSize(1);
70 this->m_Parameters.Fill(parameterVal);
75 inline bool Compute(
double deltaEnergy)
override
87 double proba = std::exp(-(deltaEnergy) / this->m_Parameters[0]);
88 if ((m_Generator->GetIntegerVariate() % 10000) < proba * 10000)
99 m_Generator->SetSeed(seed);
103 m_Generator->SetSeed();
110 this->m_NumberOfParameters = 1;
111 this->m_Parameters.SetSize(1);
112 this->m_Parameters[0] = 1.0;
113 m_Generator = RandomGeneratorType::GetInstance();
114 m_Generator->SetSeed();