예제 #1
0
파일: Utils.cpp 프로젝트: josmartin/TAsK
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;
};