... | ... |
@@ -108,35 +108,35 @@ |
108 | 108 |
node("s",s). |
109 | 109 |
node("x",x). |
110 | 110 |
node("y",y). |
111 | 111 |
node("z",z). |
112 | 112 |
run(); |
113 | 113 |
|
114 | 114 |
MaxCardinalitySearch<Digraph,CapMap> maxcard(g,cap); |
115 | 115 |
|
116 | 116 |
maxcard.init(); |
117 | 117 |
maxcard.addSource(s); |
118 | 118 |
maxcard.start(x); |
119 | 119 |
|
120 |
check(maxcard.processed(s) |
|
120 |
check(maxcard.processed(s) && !maxcard.processed(x) && |
|
121 | 121 |
!maxcard.processed(y), "Wrong processed()!"); |
122 | 122 |
|
123 | 123 |
a=maxcard.nextNode(); |
124 | 124 |
check(maxcard.processNextNode()==a, |
125 | 125 |
"Wrong nextNode() or processNextNode() return value!"); |
126 | 126 |
|
127 | 127 |
check(maxcard.processed(a), "Wrong processNextNode()!"); |
128 | 128 |
|
129 | 129 |
maxcard.start(); |
130 |
check(maxcard.cardinality(x)==2 |
|
130 |
check(maxcard.cardinality(x)==2 && maxcard.cardinality(y)>=4, |
|
131 | 131 |
"Wrong cardinalities!"); |
132 | 132 |
} |
133 | 133 |
|
134 | 134 |
void checkWithConst1Map(std::istringstream &input) { |
135 | 135 |
typedef SmartDigraph Digraph; |
136 | 136 |
typedef Digraph::Node Node; |
137 | 137 |
|
138 | 138 |
Digraph g; |
139 | 139 |
Node s,x,y,z; |
140 | 140 |
|
141 | 141 |
DigraphReader<Digraph>(g,input). |
142 | 142 |
node("s",s). |
0 comments (0 inline)