16,471
社区成员
发帖
与我相关
我的任务
分享
vector<int>::iterator it;
int isAbleToDistribute = 0;
for (it = consumList.at(0).parents.begin(); it != consumList.at(0).parents.end(); it++){
//将父亲节点封装成VNode
VNode tmp = findParent(*it, adjList);
isAbleToDistribute = canDealWithParents(tmp, notDistributedSource, adjList);
// 更新没有分发出去的资源
notDistributedSource = isAbleToDistribute;
if (isAbleToDistribute == 0) break;
}