예제 #1
0
 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;
 }
예제 #2
0
void SegmentInfo::recalculateGamma() {
    GammaFunctions::GammaVariate * gamma = getGamma();
    gamma->clearSamples();
    const QwtData &tdd = sampleCurve.data();
    for(unsigned i = gammaStartIndex; i <= gammaEndIndex; ++i) {
        if (i < tdd.size())
            gamma->addSample(tdd.x(i), tdd.y(i));
    }
    gamma->findFromSamples();
}
예제 #3
0
    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;
    }