final commit, project finished
[co1314.git] / IPetproblemSolver.java
1 public interface IPetproblemSolver {
2 /**
3 * Solves the Pet Problem.
4 * @param n The number of children.
5 * @param m The number of pets.
6 * @param compatibility Matrix containing for every element c[i][j] the value of f(i, j). (See assignment)
7 * For the base case contains either values "0" or "1".
8 * For the bonus case might contain any non-negative number.
9 * @return An array with n elements, containing the index the pet assigned to each child.
10 * Thus result[i] = j means "child i gets pet j".
11 * If a child gets no pet, assign the value "-1".
12 */
13 int[] solve(int n, int m, final int[][] compatibility);
14 }