@Override
  public void initialize(ParameterValueAssignment configuration) {
    final String paramType = configuration.getParameter().getType();
    final DynamicValueAssignment dva = (DynamicValueAssignment) configuration;
    final Map<String, String> params = dva.getConfiguration();

    parameterType = SupportedTypes.get(paramType);
    if (parameterType == null) {
      throw new IllegalArgumentException(
          "The given parameter value assignment is not supported by "
              + this.getClass().getSimpleName()
              + ".");
    }

    final LMVState dState = new LMVState();
    dState.min = Double.valueOf(params.get(PARAM_MIN));
    dState.max = Double.valueOf(params.get(PARAM_MAX));
    dState.step = Double.valueOf(params.get(PARAM_STEP));
    state = dState;

    if (state.step == 0) {
      state.size = 1;
    } else {
      state.size = (int) (1 + Math.floor((state.max - state.min) / state.step));
    }

    dynamicValueAssignment = dva;
  }
  @Override
  public ParameterValue<?> get(int pos) {
    if (pos < state.size) {
      final double value = state.min + pos * state.step;
      ParameterValue<?> result = null;

      switch (parameterType) {
        case Integer:
          result =
              ParameterValueFactory.createParameterValue(
                  dynamicValueAssignment.getParameter(), (int) Math.round(value));
          break;
        case Double:
          result =
              ParameterValueFactory.createParameterValue(
                  dynamicValueAssignment.getParameter(), value);
        default:
          break;
      }

      return result;
    } else {
      throw new IndexOutOfBoundsException(
          "Parameter value index " + pos + " is out of bound [0.." + state.size + "].");
    }
  }
 @Override
 public ParameterDefinition getParameter() {
   return dynamicValueAssignment.getParameter();
 }