Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c2bfc9a5 authored by Tomofumi Yuki's avatar Tomofumi Yuki
Browse files

added sort of next candidates by last modified symbol name to make the

choice deterministic
parent 193cd71c
No related branches found
No related tags found
1 merge request!4Develop
......@@ -3,6 +3,8 @@ package fr.irisa.cairn.gecos.typeexploration.dse;
import static java.util.stream.Collectors.toList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
......@@ -302,6 +304,14 @@ public class TabuExploration extends AbstractExplorationAlgorithm {
nextSolutionCandidates.get(i).currentSolution.setNote("selected", "F");
}
Collections.sort(nextSolutionCandidates, new Comparator<WordLengthsExplorer>() {
@Override
public int compare(WordLengthsExplorer o1, WordLengthsExplorer o2) {
return o1.getLastModifiedSymbol().getName().compareTo(o2.getLastModifiedSymbol().getName());
}
});
final WordLengthsExplorer nextBest;
if(directionUp) {
nextBest = criteria.stream()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment