m_population[j]. setFitness(Math.abs((a * m_population[j].getObjective() + b)));
if (a == Double.POSITIVE_INFINITY || a == Double.NEGATIVE_INFINITY || b == Double.POSITIVE_INFINITY || b == Double.NEGATIVE_INFINITY) { m_population[j].setFitness(m_population[j].getObjective()); } else { m_population[j]. setFitness(Math.abs((a * m_population[j].getObjective() + b))); }
  private void scalePopulation() {    int j;    double a = 0;    double b = 0;    double fmultiple = 2.0;    double delta;        // prescale    if (m_minFitness > ((fmultiple * m_avgFitness - m_maxFitness) / 			(fmultiple - 1.0))) {      delta = m_maxFitness - m_avgFitness;      a = ((fmultiple - 1.0) * m_avgFitness / delta);      b = m_avgFitness * (m_maxFitness - fmultiple * m_avgFitness) / delta;    }    else {      delta = m_avgFitness - m_minFitness;      a = m_avgFitness / delta;      b = -m_minFitness * m_avgFitness / delta;    }          // scalepop    m_sumFitness = 0;    for (j=0;j<m_popSize;j++) {      m_population[j].	setFitness(Math.abs((a * m_population[j].getObjective() + b)));      m_sumFitness += m_population[j].getFitness();    }  }