1.1 --- a/src/demo/min_route.cc Fri Apr 15 14:03:23 2005 +0000
1.2 +++ b/src/demo/min_route.cc Fri Apr 15 14:46:03 2005 +0000
1.3 @@ -1,3 +1,6 @@
1.4 +#include <iostream>
1.5 +#include <fstream>
1.6 +
1.7 #include <lemon/smart_graph.h>
1.8 #include <lemon/dijkstra.h>
1.9 #include <lemon/maps.h>
1.10 @@ -8,6 +11,7 @@
1.11
1.12 #include <cmath>
1.13
1.14 +
1.15 using namespace lemon;
1.16
1.17 template <typename CoordMap>
1.18 @@ -24,8 +28,8 @@
1.19 (coord[node].y - target.y) * (coord[node].y - target.y));
1.20 }
1.21 private:
1.22 + const CoordMap& coord;
1.23 xy<double> target;
1.24 - const CoordMap& coord;
1.25 };
1.26
1.27 template <typename Graph, typename LengthMap, typename PotentialMap>
1.28 @@ -60,7 +64,8 @@
1.29
1.30 SmartGraph graph;
1.31
1.32 - GraphReader<Graph> reader(std::cin, graph);
1.33 + std::ifstream is("route.lgf");
1.34 + GraphReader<Graph> reader(is, graph);
1.35
1.36 CoordMap coord(graph);
1.37 XMap<CoordMap> xcoord = xMap(coord);