001 package ifs.solution;
002
003 /**
004 * IFS solution comparator.
005 * <br><br>
006 * The solution comparator compares two solutions: the current solution and the best solution found. This comparison can
007 * be based on several criteria. For example, it can lexicographically order solutions according to the number of
008 * unassigned variables (smaller number is better) and the number of violated soft constraints.
009 *
010 * @see Solution
011 * @see ifs.solver.Solver
012 *
013 * @author <a href="mailto:muller@ktiml.mff.cuni.cz">Tomáš Müller</a>
014 * @version 1.0
015 */
016 public interface SolutionComparator {
017 /** Compares two solutions. Returns true if the given solution is better than its best ever found solution (see {@link Solution#saveBest()} and {@link Solution#restoreBest()}).
018 * @param currentSolution given solution
019 * @return true if the given solution is better than the best ever found solution
020 */
021 public boolean isBetterThanBestSolution(Solution currentSolution);
022 }