MeasureType GetValue( const ParametersType & parameters ) const { GammaFunctions::GammaVariate myGamma; myGamma.setSamples( samples ); myGamma.setParameters( parameters[0], parameters[1], parameters[2], parameters[3], parameters[4] ); double dist = myGamma.distanceToSamples(); return dist; }
MeasureType GetValue( const ParametersType & parameters ) const { GammaFunctions::GammaVariate myGamma; myGamma.setSamples( samples ); myGamma.setParameters( parameters[0], parameters[1], parameters[2], parameters[3], parameters[4] ); double dist = myGamma.distanceToSamples(); if (parameters[4] < minAlpha){ if (parameters[4] <= 1.0) dist = std::numeric_limits< double >::max(); else dist /= (1.0/(minAlpha-1.0))*(parameters[4]-1.0); } return dist; }