package afryca.consensusmodel; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import afryca.cm.CM; import afryca.consensusmodel.cluster.ClusterFPR; import afryca.fpr.FPR; public class GenerateRecommendations { public static List recommendationsForGroup(List cluster, FPR collectiveMinimumCost,ArrayList proximityValues, Float [] consensusAlternatives, ArrayList proximityMatrix,double proximityAverage,CM proximityMatrixAverage, Float consensusThreshold){ int numberOfAlternatives=consensusAlternatives.length; List recommendations = new LinkedList(); for (int cl = 0; cl < cluster.size(); cl++) { if(!cluster.get(cl).getExperts().isEmpty()){ if(Math.round(proximityValues.get(cl)*10000d)/10000d <= Math.round(proximityAverage*10000d)/10000d){ for (int alt = 0; alt < numberOfAlternatives; alt++) { if(Math.round(consensusAlternatives[alt]*10000d)/10000d <= Math.round(consensusThreshold*10000d)/10000d){ for (int j = 0; j < numberOfAlternatives; j++) { if( alt!=j && alt recommendationsIndividual(List cluster, FPR collective,ArrayList proximityValues, Float [] consensusAlternatives, ArrayList proximityMatrix,double proximityAverage,CM proximityMatrixAverage, Float consensusThreshold, Integer lamda){ int numberOfAlternatives=consensusAlternatives.length; List recommendations = new LinkedList(); for (int cl = 0; cl < cluster.size(); cl++) { if(!cluster.get(cl).getExperts().isEmpty()){ if(Math.round(proximityValues.get(cl)*10000d)/10000d <= Math.round(proximityAverage*10000d)/10000d){ for (int alt = 0; alt < numberOfAlternatives; alt++) { if(Math.round(consensusAlternatives[alt]*10000d)/10000d <= Math.round(consensusThreshold*10000d)/10000d){ for (int j = 0; j < numberOfAlternatives; j++) { if( alt!=j && alt value2){ direction = EChangeType.Decrease; } } return direction; } }