# sample data file # # the definition of the graph is between "begingraph" and "endgraph" # begingraph width 3 # width of lattice represented by the number of nodes nodenum 6 # number of nodes in the graph edgenum 9 # number of edges in the graph source 0 # index of the source node nodestart 0 # node index starts from this number (default 1) # edges are defined below: (edge weight, end node 1, end node 2) edge 1 0 3 edge 1 3 4 edge 4 1 3 edge 3 0 4 edge 10 0 1 edge 1 4 1 edge 10 2 1 edge 10 2 5 edge 30 4 5 endgraph step ########################### initialize labels label 0 0 label 1 inf label 2 inf label 3 inf label 4 inf label 5 inf step ########################### label of node 0 is fixed colornode 0 gray step ########################### scan an edge coloredge 0 1 blue colornode 1 blue label 1 10 step ########################### scan an edge coloredge 0 4 blue colornode 4 blue label 4 3 step ########################### scan an edge coloredge 0 3 blue colornode 3 blue label 3 1 step ########################### label of node 3 is fixed coloredge 0 3 red colornode 3 gray step ########################### scan an edge coloredge 3 1 blue colornode 1 blue label 1 5 step ########################### scan an edge coloredge 3 4 blue colornode 4 blue label 4 2 step ########################### label of node 4 is fixed coloredge 3 4 red colornode 4 gray step ########################### scan an edge coloredge 4 1 blue colornode 1 blue label 1 3 step ########################### scan an edge coloredge 4 5 blue colornode 5 blue label 5 32 step ########################### label of node 1 is fixed coloredge 4 1 red colornode 1 gray step ########################### scan an edge coloredge 1 2 blue colornode 2 blue label 2 13 step ########################### label of node 2 is fixed coloredge 1 2 red colornode 2 gray step ########################### scan an edge coloredge 2 5 blue colornode 5 blue label 5 23 step ########################### label of node 5 is fixed coloredge 2 5 red colornode 5 gray end ############################ the end of computation