From 83779ce640236f3198a58ded18e58d419833b5a4 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 15 Oct 2015 16:06:47 +0200 Subject: Fix height/width inversion --- src/main/java/Seam.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 { for (int row = 0; row < height - 1; ++row) { int shift = (row + 1) * width; - graph[row * height] = new int[]{ + graph[row * width] = new int[]{ shift, shift + 1, }; - graph[row * height + (width - 1)] = new int[]{ + graph[row * width + (width - 1)] = new int[]{ shift + (width - 2), shift + (width - 1), }; for (int col = 1; col < width - 1; ++col) - graph[row * height + col] = new int[]{ + graph[row * width + col] = new int[]{ shift + (col - 1), shift + (col), shift + (col + 1), -- cgit v1.2.3