summaryrefslogtreecommitdiff
path: root/graph/bellmannFord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graph/bellmannFord.cpp')
-rw-r--r--graph/bellmannFord.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graph/bellmannFord.cpp b/graph/bellmannFord.cpp
index 21c7dbe..730cad2 100644
--- a/graph/bellmannFord.cpp
+++ b/graph/bellmannFord.cpp
@@ -5,14 +5,14 @@ void bellmannFord(int n, vector<edge> edges, int start) {
for (int i = 1; i < n; i++) {
for (edge& e : edges) {
if (dist[e.from] != INF &&
- dist[e.from] + e.cost < dist[e.to]) {
+ dist[e.from] + e.cost < dist[e.to]) {
dist[e.to] = dist[e.from] + e.cost;
parent[e.to] = e.from;
}}}
for (edge& e : edges) {
if (dist[e.from] != INF &&
- dist[e.from] + e.cost < dist[e.to]) {
+ dist[e.from] + e.cost < dist[e.to]) {
// Negativer Kreis gefunden.
}}
//return dist, parent;