Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dijkstra's Algorithm

Name: Anonymous 2011-04-28 15:44

    int h = 0;
    loop1:
    if (h < n) {
        int i = 0;
        loop2:
    if (i < n) {
            int j = 0;
            loop3:
            if (j < n) {
                if (distance[i][h] + distance[h][j] < distance[i][j]) {
                    distance[i][j] = distance[i][h] + distance[h][j];
                    path[i][j] = h;
                }
                j++;
                goto loop3;
            }
            i++;
            goto loop2;
        }
        h++;
    goto loop1;
    }

Name: Anonymous 2011-04-28 20:25

n3
Reads: N-threebed

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List