|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmetal.util.comparators.NumberOfViolatedConstraintComparator
public class NumberOfViolatedConstraintComparator
This class implements a Comparator (a method for comparing
Solution objects) based on the number of violated constraints.
| Constructor Summary | |
|---|---|
NumberOfViolatedConstraintComparator()
|
|
| Method Summary | |
|---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two solutions. |
boolean |
needToCompare(Solution s1,
Solution s2)
Returns true if solutions s1 and/or s2 violates a number n > 0 of constraints |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public NumberOfViolatedConstraintComparator()
| Method Detail |
|---|
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparatorcompare in interface IConstraintViolationComparatoro1 - Object representing the first Solution.o2 - Object representing the second Solution.
public boolean needToCompare(Solution s1,
Solution s2)
needToCompare in interface IConstraintViolationComparator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||