public void removeDuplicatedAlgorithms ( ) { List < ExperimentAlgorithm < S , Result > > algorithmList = new ArrayList <> ( ) ; HashSet < String > algorithmTagList = new HashSet <> ( ) ; getAlgorithmList ( ) . removeIf ( alg -> ! algorithmTagList . add ( alg . getAlgorithmTag ( ) ) ) ; }
The list of algorithms contain an algorithm instance per problem . This is not convenient for calculating statistical data because a same algorithm will appear many times . This method remove duplicated algorithms and leave only an instance of each one .