| 52 | { |
| 53 | template <typename EXP> |
| 54 | inline void compute_slack( |
| 55 | const long x, |
| 56 | std::vector<typename EXP::type>& slack, |
| 57 | std::vector<long>& slackx, |
| 58 | const matrix_exp<EXP>& cost, |
| 59 | const std::vector<typename EXP::type>& lx, |
| 60 | const std::vector<typename EXP::type>& ly |
| 61 | ) |
| 62 | { |
| 63 | for (long y = 0; y < cost.nc(); ++y) |
| 64 | { |
| 65 | if (lx[x] + ly[y] - cost(x,y) < slack[y]) |
| 66 | { |
| 67 | slack[y] = lx[x] + ly[y] - cost(x,y); |
| 68 | slackx[y] = x; |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | // ---------------------------------------------------------------------------------------- |
no test coverage detected