protected void setRandomValue(double a_value) { RandomGenerator randomGen = getGPConfiguration().getRandomGenerator(); m_value_double = randomGen.nextDouble() * (m_upperBounds - m_lowerBounds) + m_lowerBounds; if (m_wholeNumbers) { m_value_double = Math.round(m_value_double); } }
protected void setRandomValue(float a_value) { RandomGenerator randomGen = getGPConfiguration().getRandomGenerator(); m_value_float = (float) (randomGen.nextFloat() * (m_upperBounds - m_lowerBounds) + m_lowerBounds); if (m_wholeNumbers) { m_value_float = Math.round(m_value_float); } }
protected void setRandomValue(long a_value) { RandomGenerator randomGen = getGPConfiguration().getRandomGenerator(); m_value_long = Math.round(randomGen.nextDouble() * (m_upperBounds - m_lowerBounds) + m_lowerBounds); }