2 ######################################################################
4 2012 Aug 22 14:26:53 (from mtp.cc)
10 cerr << argv[0] << " <graph file>" << endl;
14 ifstream *file = new ifstream(argv[1]);
16 int nb_edges, nb_vertices;
21 (*file) >> nb_vertices >> nb_edges;
22 (*file) >> source >> sink;
24 scalar_t *edge_lengths = new scalar_t[nb_edges];
25 int *vertex_from = new int[nb_edges];
26 int *vertex_to = new int[nb_edges];
27 int *result_edge_occupation = new int[nb_edges];
29 for(int e = 0; e < nb_edges; e++) {
30 (*file) >> vertex_from[e] >> vertex_to[e] >> edge_lengths[e];
33 find_best_paths(nb_vertices, nb_edges,
34 vertex_from, vertex_to, edge_lengths,
36 result_edge_occupation);
38 // dot_print(nb_vertices, nb_edges,
39 // vertex_from, vertex_to, edge_lengths,
41 // result_edge_occupation);
43 delete[] result_edge_occupation;
44 delete[] edge_lengths;
50 cerr << "Can not open " << argv[1] << endl;
59 ######################################################################
61 2012 Dec 29 00:09:41 (from mtp_example.cc)
63 { // ******************************* START ***************************
64 #warning Test code added on 2012 Dec 29 00:07:21
65 int nb_vertices = 100;
66 int *vertex_from = new int[nb_vertices];
67 int *vertex_to = new int[nb_vertices];
68 for(int k = 0; k < nb_vertices; k++) {
70 vertex_to[k] = (k + 1)%nb_vertices;
72 MTPGraph mg(nb_vertices, nb_vertices, vertex_from, vertex_to, 0, nb_vertices/2);
75 } // ******************************** END ****************************