void IntervalVariable::projectInfCost(Cost cost) { infCost += cost; assert(infCost >= MIN_COST); if (getInf() == maxCostValue || infCost > maxCost) queueNC(); if (CUT(infCost + wcsp->getLb(),wcsp->getUb())) increaseFast(getInf() + 1); }
Tone::Tone(): freq(0.0), db(-getInf()), stabledb(-getInf()), age() { for (std::size_t i = 0; i < MAXHARM; ++i) harmonics[i] = -getInf(); }
void MainWindow::refreshMonitor() { ui->textBrowser_room1->setText(getInf(1)); ui->textBrowser_room2->setText(getInf(2)); ui->textBrowser_room3->setText(getInf(3)); ui->textBrowser_room4->setText(getInf(4)); ui->textBrowser_room5->setText(getInf(5)); server->dispatch(Sdispatch); }
void IntervalVariable::propagateNC() { if (ToulBar2::verbose >= 3) cout << "propagateNC for " << getName() << endl; if (CUT(getInfCost() + wcsp->getLb(), wcsp->getUb())) increaseFast(getInf() + 1); if (CUT(getSupCost() + wcsp->getLb(), wcsp->getUb())) decreaseFast(getSup() - 1); if (getInfCost() > getSupCost()) { setMaxUnaryCost(getInf(), getInfCost()); } else { setMaxUnaryCost(getSup(), getSupCost()); } }
//Finds the first available element whose value is greater or equal to v iterator lower_bound(Value v) { if (v <= sup) return iterator(this, max(getInf(), v)); else return end(); }