Ejemplo n.º 1
0
  @Override
  public void configure(Configuration conf) {

    if (conf.containsKey("MaxNumRestarts")) {
      this.max_num_restarts = conf.getInt("MaxNumRestarts");
    } else {
      ConfWarning w =
          new ConfWarning(
              this.getClass().getSimpleName() + ".MaxNumRestarts", this.max_num_restarts);
      w.warn();
    }

    if (conf.containsKey("IncrPopFactor")) {
      this.incr_factor = conf.getDouble("IncrPopFactor");
    } else {
      ConfWarning w =
          new ConfWarning(this.getClass().getSimpleName() + ".IncrPopFactor", this.incr_factor);
      w.warn();
    }
  }
  @Override
  public void configure(Configuration conf) {

    super.configure(conf);
    if (conf.containsKey("LowerStandardDeviation")) {
      this.lowerStandardDeviation =
          parseDouble(conf.getString("LowerStandardDeviation").split(","));
    } else {
      this.lowerStandardDeviation = null;
      ConfWarning w = new ConfWarning("CMASamplePopulationOperator.LowerStandardDeviation", null);
      w.warn();
    }

    if (conf.containsKey("UpperStandardDeviation")) {
      this.upperStandardDeviation =
          parseDouble(conf.getString("UpperStandardDeviation").split(","));
    } else {
      this.upperStandardDeviation = null;
      ConfWarning w = new ConfWarning("CMASamplePopulationOperator.UpperStandardDeviation", null);
      w.warn();
    }
  }