diff options
Diffstat (limited to 'graph/bellmannFord.cpp')
| -rw-r--r-- | graph/bellmannFord.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/graph/bellmannFord.cpp b/graph/bellmannFord.cpp deleted file mode 100644 index 4324886..0000000 --- a/graph/bellmannFord.cpp +++ /dev/null @@ -1,17 +0,0 @@ -void bellmannFord(int n, vector<edge> edges, int start) { - vector<ll> dist(n, INF), parent(n, -1); - dist[start] = 0; - - 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.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]) { - // Negativer Kreis gefunden. -}}} //return dist, parent?; |
