******** fig9.32 ********** void dijkstra( TABLE T ) { vertex v, w; /*1*/ for( ; ; ) { /*2*/ v = smallest unknown distance vertex; /*3*/ if( v == NOT_A_VERTEX ) /*4*/ break; /*5*/ T[v].known = TRUE; /*6*/ for each w adjacent to v /*7*/ if( !T[w].known ) /*8*/ if( T[v].dist + c(v,w) < T[w].dist ) /*update w */ { /*9*/ decrease( T[w].dist to T[v].dist + c(v,w)); /*10*/ T[w].path = v; } } }