private int getfittestParticle(Vector<Integer> particles) {
		if(maximum){
			double fitness = solutionFitness.get(particles.get(0));
			int result = particles.get(0);
			for(int i = 1; i < particles.size(); i++){
				double temp = solutionFitness.get(particles.get(i));
				if(temp > fitness){
					fitness = temp;
					result = particles.get(i);
				}
			}
			return result;
		}else{
			double fitness = solutionFitness.get(particles.get(0));
			int result = particles.get(0);
			for(int i = 1; i < particles.size(); i++){
				double temp = solutionFitness.get(particles.get(i));
				if(temp < fitness){
					fitness = temp;
					result = particles.get(i);
				}
			}
			return result;
		}
	}