// $Id: C_evalParamUSSRV.cpp 1915 2007-04-04 15:56:24Z privmane $ #include "C_evalParamUSSRV.h" // ********************* // * USSRV * // ********************* MDOUBLE C_evalParamUSSRV::operator() (MDOUBLE param) { setParam(param); MDOUBLE res = likelihoodComputation2USSRV::getTreeLikelihoodAllPosAlphTheSame(_et,_sc,_baseSc,*_pModel,_weights); print(param,res); return -res; } void C_evalAlphaUSSRV::setParam(MDOUBLE alpha) { if (_pModel->noOfCategor() == 1) errorMsg::reportError(" one category when trying to optimize alpha"); _pModel->updateAlpha(alpha); } void C_evalAlphaUSSRV::print(MDOUBLE alpha,MDOUBLE res) { LOG(5,<<" with Alpha = "<(_ssrvSp.getPijAccelerator()->getReplacementModel()); gammaDistribution* gammaDist = static_cast(pMulRM->getDistribution()); gammaDist->setAlpha(alpha); pMulRM->updateQ(); } void C_evalAlphaSSRV::print(MDOUBLE alpha,MDOUBLE res) { LOG(5,<<" with Alpha = "<(_ssrvSp.getPijAccelerator()->getReplacementModel())->setRateOfRate(Nu); } void C_evalNuSSRV::print(MDOUBLE nu,MDOUBLE res) { LOG(5,<<" with Nu = "<