FPType Utils::calculatePathDerivativeForDisjoint(const std::list<StarLink*> &list){ StarLink* link = NULL; FPType der = 0.0; for (std::list<StarLink*>::const_iterator it = list.begin(); it != list.end(); ++it) { link = *it; der += link->getDerivative(); } return der; };
FPType DescDirectionPathISP::calculateDerivative(Path* path) const{ FPType der = 0.0; FPType flow = 0.0; for (StarLinkIterator it = path->begin(); it != path->end(); ++it) { StarLink* link = *it; flow = link->getFlow(); if (flow < slope_) { flow = slope_; } der += link->getDerivative(); } return der; };