0
2
0
... | ... |
@@ -7,13 +7,13 @@ |
7 | 7 |
4 |
8 | 8 |
5 |
9 | 9 |
6 |
10 | 10 |
7 |
11 | 11 |
8 |
12 | 12 |
9 |
13 |
@ |
|
13 |
@arcs |
|
14 | 14 |
label capacity |
15 | 15 |
0 1 0 20 |
16 | 16 |
0 2 1 0 |
17 | 17 |
1 1 2 3 |
18 | 18 |
1 2 3 8 |
19 | 19 |
1 3 4 8 |
... | ... |
@@ -29,7 +29,6 @@ |
29 | 29 |
8 9 14 20 |
30 | 30 |
8 1 15 5 |
31 | 31 |
9 5 16 5 |
32 | 32 |
@attributes |
33 | 33 |
source 1 |
34 | 34 |
target 8 |
35 |
@end |
... | ... |
@@ -22,34 +22,42 @@ |
22 | 22 |
#include "test_tools.h" |
23 | 23 |
#include <lemon/smart_graph.h> |
24 | 24 |
#include <lemon/preflow.h> |
25 | 25 |
#include <lemon/concepts/digraph.h> |
26 | 26 |
#include <lemon/concepts/maps.h> |
27 | 27 |
#include <lemon/lgf_reader.h> |
28 |
#include <lemon/elevator.h> |
|
28 | 29 |
|
29 | 30 |
using namespace lemon; |
30 | 31 |
|
31 |
void |
|
32 |
void checkPreflowCompile() |
|
32 | 33 |
{ |
33 | 34 |
typedef int VType; |
34 | 35 |
typedef concepts::Digraph Digraph; |
35 | 36 |
|
36 | 37 |
typedef Digraph::Node Node; |
37 | 38 |
typedef Digraph::Arc Arc; |
38 | 39 |
typedef concepts::ReadMap<Arc,VType> CapMap; |
39 | 40 |
typedef concepts::ReadWriteMap<Arc,VType> FlowMap; |
40 | 41 |
typedef concepts::WriteMap<Node,bool> CutMap; |
41 | 42 |
|
43 |
typedef Elevator<Digraph, Digraph::Node> Elev; |
|
44 |
typedef LinkedElevator<Digraph, Digraph::Node> LinkedElev; |
|
45 |
|
|
42 | 46 |
Digraph g; |
43 | 47 |
Node n; |
44 | 48 |
Arc e; |
45 | 49 |
CapMap cap; |
46 | 50 |
FlowMap flow; |
47 | 51 |
CutMap cut; |
48 | 52 |
|
49 |
Preflow<Digraph, CapMap> |
|
53 |
Preflow<Digraph, CapMap> |
|
54 |
::SetFlowMap<FlowMap> |
|
55 |
::SetElevator<Elev> |
|
56 |
::SetStandardElevator<LinkedElev> |
|
57 |
::Create preflow_test(g,cap,n,n); |
|
50 | 58 |
|
51 | 59 |
preflow_test.capacityMap(cap); |
52 | 60 |
flow = preflow_test.flowMap(); |
53 | 61 |
preflow_test.flowMap(flow); |
54 | 62 |
preflow_test.source(n); |
55 | 63 |
preflow_test.target(n); |
0 comments (0 inline)