Skip to content

Commit d173407

Browse files
committed
Fix inverted logic
1 parent 915ce4e commit d173407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Balance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function isBalancedFlow()
4747
// no need to check for each edge: flow <= capacity (setters already check that)
4848
// check for each vertex: outflow-inflow = balance
4949
foreach ($this->graph->getVertices() as $vertex) {
50-
if ($vertex->getFlow() === $vertex->getBalance()) {
50+
if ($vertex->getFlow() !== $vertex->getBalance()) {
5151
return false;
5252
}
5353
}

0 commit comments

Comments
 (0)