diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/Seam.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/Seam.java b/src/main/java/Seam.java index d3ffa8e..3778f34 100644 --- a/src/main/java/Seam.java +++ b/src/main/java/Seam.java | |||
@@ -53,18 +53,18 @@ public final class Seam { | |||
53 | for (int row = 0; row < height - 1; ++row) { | 53 | for (int row = 0; row < height - 1; ++row) { |
54 | int shift = (row + 1) * width; | 54 | int shift = (row + 1) * width; |
55 | 55 | ||
56 | graph[row * height] = new int[]{ | 56 | graph[row * width] = new int[]{ |
57 | shift, | 57 | shift, |
58 | shift + 1, | 58 | shift + 1, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | graph[row * height + (width - 1)] = new int[]{ | 61 | graph[row * width + (width - 1)] = new int[]{ |
62 | shift + (width - 2), | 62 | shift + (width - 2), |
63 | shift + (width - 1), | 63 | shift + (width - 1), |
64 | }; | 64 | }; |
65 | 65 | ||
66 | for (int col = 1; col < width - 1; ++col) | 66 | for (int col = 1; col < width - 1; ++col) |
67 | graph[row * height + col] = new int[]{ | 67 | graph[row * width + col] = new int[]{ |
68 | shift + (col - 1), | 68 | shift + (col - 1), |
69 | shift + (col), | 69 | shift + (col), |
70 | shift + (col + 1), | 70 | shift + (col + 1), |