MCPcopy Create free account
hub / github.com/Syncleus/aparapi / costDiag

Method costDiag

src/test/java/com/aparapi/codegen/Diff.java:69–79  ·  view source on GitHub ↗
(List<Point>[][] flags, int x, int y)

Source from the content-addressed store, hash-verified

67 }
68
69 static void costDiag(List<Point>[][] flags, int x, int y) {
70 if (x == 0 || y == 0 || flags[x - 1][y - 1] == null) {
71 if (x < (flags.length - 2) && y < (flags[0].length - 2)) {
72 flags[x][y] = new ArrayList<Point>();
73 flags[x][y].add(new Point(x, y));
74 }
75 } else {
76 flags[x - 1][y - 1].add(new Point(x, y));
77 flags[x][y] = flags[x - 1][y - 1];
78 }
79 }
80
81 static void cleanIslands(List<Point>[][] flags, int x, int y) {
82 flags[x][y] = null;

Callers 1

diffMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected