标签:each deque ext creat make weight not isp queue
借助队列处理
void Unweighted(Table T) { Queue Q; Vertext V, W; Q = CreateQueue(NumVertex); MakeEmpty(Q); Enqueue(S, Q); while (!IsEmpty(Q)) { V = Dequeue(Q); T[V].Know = True; for each W adjacent to V if (T[V].Dist + Cvw < T[W].Dist) { T[W].Dist = T[V].Dist + Cvw; T[W].Path = V; if (W is not in Q) Enqueue(W, Q); } } DisPoseQueue(Q); }
标签:each deque ext creat make weight not isp queue
原文地址:http://www.cnblogs.com/m2492565210/p/7258651.html