1 package civitas.result;
2
3 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.stereotype.Controller;
5
6 @Controller
7 public class TransitiveClosure {
8
9 @Autowired
10 Min min;
11
12 @Autowired
13 Max max;
14
15 void apply(final CandidatePair[][] m, final Integer n) {
16 for (int k = 0; k < n; k++) {
17 for (int i = 0; i < n; i++) {
18 for (int j = 0; j < n; j++) {
19 m[i][j] = max.apply(m[i][j], min.apply(m[i][k], m[k][j]));
20 }
21 }
22 }
23 }
24 }