private int compareFitness(int particle1, int particle2){
		double p1 = fitness.get(particle1);
		double p2 = fitness.get(particle2);
		if(maximum){
			if(p1 > p2){
				return particle1;
			}else{
				return particle2;
			}
		}else{
			if(p1 < p2){
				return particle1;
			}else{
				return particle2;
			}
		}
	}