}//求解关键路径voidcritical_path(GraphMtx* g){intn = g->NumVertices;//最早开始时间数组int* ve = (int*)malloc(sizeof(int) * n);//最晚开始时间数组int* vl = (int*)malloc(sizeof(int) * n); assert(NULL!= ve &&NULL!= vl);for(inti =0; i < n; ++i){ ve[i] =0; vl[i]...
通过其"乘法"运算可以同时求出简单有向无环赋权图中任意2点间的最大权值以及对应的路径,从而可以同时求出计划评审方法(program evaluation and review technique,PERT)图与关键路线方法(critical path method,CPM)图中的关键路径与对应的最大权值,本方法的优点是所求路径与对应权值同时显示在最终的一般邻接路径矩阵上...
EgetWeight(GraphMtx*g,intv1,intv2){ if(v1==-1||v2==-1)return0; returng->Edge[v1][v2]; } //求解关键路径 voidcritical_path(GraphMtx*g){ intn=g->NumVertices; //最早开始时间数组 int*ve=(int*)malloc(sizeof(int)*n); //最晚开始时间数组 int*vl=(int*)malloc(sizeof(int)*n...