src/work/deba/dijkstra_test_generator.cpp
changeset 1365 c280de819a73
parent 1364 ee5959aa4410
child 1366 d00b85f8be45
     1.1 --- a/src/work/deba/dijkstra_test_generator.cpp	Sun Apr 17 18:57:22 2005 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,41 +0,0 @@
     1.4 -#include <iostream>
     1.5 -#include <vector>
     1.6 -
     1.7 -#include <cmath>
     1.8 -#include <cstdlib>
     1.9 -
    1.10 -#include <lemon/smart_graph.h>
    1.11 -#include <lemon/graph_writer.h>
    1.12 -
    1.13 -using namespace lemon;
    1.14 -using namespace std;
    1.15 -
    1.16 -int main(int argc, const char *argv[]) {
    1.17 -  typedef SmartGraph Graph;
    1.18 -  typedef Graph::Node Node;
    1.19 -  typedef Graph::Edge Edge;
    1.20 -
    1.21 -  typedef Graph::EdgeMap<int> CapacityMap;
    1.22 -
    1.23 -  const int n = argc > 1 ? atoi(argv[1]) : 1000;
    1.24 -  const int e = argc > 2 ? atoi(argv[2]) : (int)(n * log(n));
    1.25 -  const int m = argc > 3 ? atoi(argv[3]) : 100;
    1.26 -
    1.27 -  Graph graph;
    1.28 -  CapacityMap capacity(graph);
    1.29 -  vector<Node> nodes;
    1.30 -
    1.31 -  for (int i = 0; i < n; ++i) {
    1.32 -    nodes.push_back(graph.addNode());
    1.33 -  }
    1.34 -  for (int i = 0; i < e; ++i) {
    1.35 -    int s = (int)(n * (double)rand() / (RAND_MAX + 1.0));
    1.36 -    int t = (int)(n * (double)rand() / (RAND_MAX + 1.0));
    1.37 -    int c = (int)(m * (double)rand() / (RAND_MAX + 1.0));
    1.38 -    Edge edge = graph.addEdge(nodes[s], nodes[t]);
    1.39 -    capacity[edge] = c;
    1.40 -  }
    1.41 -  int start = (int)(n * (double)rand() / (RAND_MAX + 1.0));
    1.42 -  writeGraph(cout, graph, capacity, nodes[start]);
    1.43 -  return 0;
    1.44 -}