**fig9_33.txt** /* 1*/ void // Assume T is initialized as in Fig 9.18. /* 2*/ Weighted_Negative( Table T ) /* 3*/ { /* 4*/ Vertex V, W; /* 5*/ Queue Q( Num_Vertex ); /* 6*/ Q.Enqueue( S ); // Enqueue the start vertex S. /* 7*/ while( ! Q.Is_Empty( ) ) /* 8*/ { /* 9*/ V = Q.Dequeue( ); /*10*/ for Each W Adjacent To V /*11*/ if( T[ V ].Dist + C ( V, W ) < T[ W ].Dist ) /*12*/ { // Update W. /*13*/ T[ W ].Dist = T[ V ].Dist + C ( V, W ); /*14*/ T[ W ].Path = V; /*15*/ if( ! Q.Already_In_Queue( W ) ) /*16*/ Q.Enqueue( W ); /*17*/ } /*18*/ } /*19*/ }