diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
| commit | 1880ccb6d85c6eb79e724593457877bab431951c (patch) | |
| tree | 23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /content/graph/floydWarshall.cpp | |
| parent | e95f59debd69ee7d45d5c966ce466d23264e1c3c (diff) | |
get rid of all() and sz()
Diffstat (limited to 'content/graph/floydWarshall.cpp')
| -rw-r--r-- | content/graph/floydWarshall.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/content/graph/floydWarshall.cpp b/content/graph/floydWarshall.cpp index df096c2..1a1138d 100644 --- a/content/graph/floydWarshall.cpp +++ b/content/graph/floydWarshall.cpp @@ -2,16 +2,16 @@ vector<vector<ll>> dist; // Entfernung zwischen je zwei Punkten. vector<vector<int>> next; void floydWarshall() { - next.assign(sz(dist), vector<int>(sz(dist), -1)); - for (int i = 0; i < sz(dist); i++) { - for (int j = 0; j < sz(dist); j++) { + next.assign(ssize(dist), vector<int>(ssize(dist), -1)); + for (int i = 0; i < ssize(dist); i++) { + for (int j = 0; j < ssize(dist); j++) { if (dist[i][j] < INF) { next[i][j] = j; }}} - for (int k = 0; k < sz(dist); k++) { - for (int i = 0; i < sz(dist); i++) { - for (int j = 0; j < sz(dist); j++) { + for (int k = 0; k < ssize(dist); k++) { + for (int i = 0; i < ssize(dist); i++) { + for (int j = 0; j < ssize(dist); j++) { // only needed if dist can be negative if (dist[i][k] == INF || dist[k][j] == INF) continue; if (dist[i][j] > dist[i][k] + dist[k][j]) { |
