void Sbs2SourceReconstrucionLoreta::updateModel()
{
    if(!modelUpdateReady)
	return;
    modelUpdateReady = 0;


    //TODO: signal when new beta and alpha are ready

    //qDebug() << "****";

    //we collect only raw values and weight them right before updating the model
    w->multiply(currentModelUpdateValues,currentModelUpdateValuesVertices);


    //Sbs2Timer::tic("updateAlpha()");
    updateAlpha();
    //Sbs2Timer::toc();

    //Sbs2Timer::tic("updateBeta()");
    updateBeta();
    //Sbs2Timer::toc();

    //Sbs2Timer::tic("updateW()");
    updateW();
    //Sbs2Timer::toc();

    modelUpdateReady = 1;
    tempModelUpdatedReady = 1;

}
Ejemplo n.º 2
0
 ExecStatus
 Single<View>::propagate(Space& home, const ModEventDelta&) {
   int n = x.size();
   if (beta > gamma) {
     GECODE_ME_CHECK(x[alpha].eq(home, s));
     return home.ES_SUBSUMED(*this);
   }
   if ((alpha < n) && !x[alpha].in(s)) {
     alpha++;
     while (alpha < beta)
       GECODE_ME_CHECK(x[alpha++].nq(home, t));
     GECODE_ES_CHECK(updateAlpha(home));
     beta = alpha;
     if (alpha < n)
       GECODE_ES_CHECK(updateBeta(home));
   } else if ((beta < n) && !x[beta].in(s)) {
     GECODE_ES_CHECK(updateBeta(home));
   }
   
   return (c.empty()) ? home.ES_SUBSUMED(*this) : ES_FIX;
 }