Пример #1
0
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;
};
Пример #2
0
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;
};