@Override public void mutateSensorGroup(Random rnd, List<SensorConfiguration> configurations) { if (configurations.isEmpty()) { return; } // Get the first sensor configuration to get the range Range range = configurations .get(0) .getSensorParameterSet() .getParameter(parameterType) .getSpec() .getRange(); float newValue = range.randomValueWithinRange(rnd); for (SensorConfiguration configuration : configurations) { configuration.getSensorParameterSet().getParameter(parameterType).setValue(newValue); } }
@Override public void mutateSensor(Random rnd, SensorConfiguration sensorConfiguration) { sensorConfiguration.getSensorParameterSet().getParameter(parameterType).randomize(rnd); }