equal
deleted
inserted
replaced
3 #include <hugo/smart_graph.h> |
3 #include <hugo/smart_graph.h> |
4 #include <hugo/dimacs.h> |
4 #include <hugo/dimacs.h> |
5 #include <hugo/preflow.h> |
5 #include <hugo/preflow.h> |
6 #include <hugo/skeletons/graph.h> |
6 #include <hugo/skeletons/graph.h> |
7 #include <hugo/skeletons/maps.h> |
7 #include <hugo/skeletons/maps.h> |
|
8 |
|
9 #include <string.h> |
|
10 |
8 using namespace hugo; |
11 using namespace hugo; |
9 |
12 |
10 void check_Preflow() |
13 void check_Preflow() |
11 { |
14 { |
12 typedef int VType; |
15 typedef int VType; |
64 typedef Graph::EdgeMap<int> FlowMap; |
67 typedef Graph::EdgeMap<int> FlowMap; |
65 typedef Graph::NodeMap<bool> CutMap; |
68 typedef Graph::NodeMap<bool> CutMap; |
66 |
69 |
67 typedef Preflow<Graph, int> PType; |
70 typedef Preflow<Graph, int> PType; |
68 |
71 |
69 std::ifstream file("preflow_graph.out"); |
72 char *f_name; |
|
73 |
|
74 f_name=new char[strlen(getenv("srcdir"))+50]; |
|
75 strcpy(f_name,getenv("srcdir")); |
|
76 strcat(f_name,"/preflow_graph.inp"); |
|
77 |
|
78 std::ifstream file(f_name); |
|
79 |
|
80 check(file,"Input file '" << f_name << "' not found."); |
|
81 |
|
82 delete [] f_name; |
70 |
83 |
71 Graph G; |
84 Graph G; |
72 Node s, t; |
85 Node s, t; |
73 CapMap cap(G); |
86 CapMap cap(G); |
74 readDimacs(file, G, cap, s, t); |
87 readDimacs(file, G, cap, s, t); |