55 for (
typename std::vector<R*>::iterator i = alternatives.begin(); i != alternatives.end() - 1; i++) {
57 for (
typename std::vector<R*>::iterator j = i + 1; j != alternatives.end(); j++) {
61 (pS->getCosts() - pR->getCosts()) /
62 (pS->getCosts() + pR->getCosts());
64 double newPR =
gawronF(pR->getProbability(), pS->getProbability(), delta);
65 double newPS = pR->getProbability() + pS->getProbability() - newPR;
66 if (std::isnan(newPR) || std::isnan(newPS)) {
67 newPR = pS->getCosts() > pR->getCosts()
69 newPS = pS->getCosts() > pR->getCosts()
72 newPR =
MIN2((
double)
MAX2(newPR, (
double) 0), (
double) 1);
73 newPS =
MIN2((
double)
MAX2(newPS, (
double) 0), (
double) 1);
74 pR->setProbability(newPR);
75 pS->setProbability(newPS);