public void join(OccurenceSet other) { for (int i = 1; i <= 9; i++) { occurenceCount[i] += other.occurenceCount[i]; } }
public static OccurenceSet operator +(OccurenceSet o1, OccurenceSet o2) { OccurenceSet result = new OccurenceSet(); for (int i = 1; i <= 9; i++) { result.occurenceCount[i] = o1.occurenceCount[i] + o2.occurenceCount[i]; } return(result); }
public void addOccurences(OccurenceSet otherActual, OccurenceSet otherPossible) { actual.join(otherActual); possible.join(otherPossible); }
public ViolationChecker() { actual = new OccurenceSet(); possible = new OccurenceSet(); }