Search in sources :

Example 1 with GreedyComparator

use of org.kanonizo.algorithms.heuristics.comparators.GreedyComparator in project kanonizo by kanonizo.

the class Schwa method getOptions.

@OptionProvider(paramKey = "schwa_secondary_objective")
public static List<Comparator> getOptions() {
    ArrayList<Comparator> options = new ArrayList<>();
    options.add(new GreedyComparator());
    options.add(new AdditionalComparator());
    return options;
}
Also used : GreedyComparator(org.kanonizo.algorithms.heuristics.comparators.GreedyComparator) ArrayList(java.util.ArrayList) AdditionalComparator(org.kanonizo.algorithms.heuristics.comparators.AdditionalComparator) AdditionalComparator(org.kanonizo.algorithms.heuristics.comparators.AdditionalComparator) GreedyComparator(org.kanonizo.algorithms.heuristics.comparators.GreedyComparator) Comparator(java.util.Comparator) OptionProvider(org.kanonizo.annotations.OptionProvider)

Example 2 with GreedyComparator

use of org.kanonizo.algorithms.heuristics.comparators.GreedyComparator in project kanonizo by kanonizo.

the class GreedyAlgorithm method init.

@Override
public void init(List<TestCase> testCases) {
    super.init(testCases);
    comp = new GreedyComparator();
    Collections.sort(testCases, comp);
}
Also used : GreedyComparator(org.kanonizo.algorithms.heuristics.comparators.GreedyComparator)

Aggregations

GreedyComparator (org.kanonizo.algorithms.heuristics.comparators.GreedyComparator)2 ArrayList (java.util.ArrayList)1 Comparator (java.util.Comparator)1 AdditionalComparator (org.kanonizo.algorithms.heuristics.comparators.AdditionalComparator)1 OptionProvider (org.kanonizo.annotations.OptionProvider)1