Package de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.GreaterEqualConstraint


       *
       * @param config Parameterization
       * @return number of steps, default 1
       */
      public static int getParameterSteps(Parameterization config) {
        final IntParameter param = new IntParameter(STEPS_ID, new GreaterEqualConstraint(1));
        if(config.grab(param)) {
          return param.getValue();
        }
        return 1;
      }
View Full Code Here


       *
       * @param config Parameterization
       * @return number of steps, default 1
       */
      public static int getParameterSteps(Parameterization config) {
        final IntParameter param = new IntParameter(STEPS_ID, new GreaterEqualConstraint(1));
        if(config.grab(param)) {
          return param.getValue();
        }
        return 1;
      }
View Full Code Here

    protected Integer minclusters = null;

    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      IntParameter minclustersP = new IntParameter(SLINK_MINCLUSTERS_ID, new GreaterEqualConstraint(1), true);
      if(config.grab(minclustersP)) {
        minclusters = minclustersP.getValue();
      }
    }
View Full Code Here

      protected int digits = 4;

      @Override
      protected void makeOptions(Parameterization config) {
        super.makeOptions(config);
        IntParameter DIGITS_PARAM = new IntParameter(DIGITS_ID, new GreaterEqualConstraint(0), 4);

        if(config.grab(DIGITS_PARAM)) {
          digits = DIGITS_PARAM.getValue();
        }
      }
View Full Code Here

      IntParameter kP = new IntParameter(K_ID, new GreaterConstraint(0));
      if(config.grab(kP)) {
        k = kP.getValue();
      }

      IntParameter maxiterP = new IntParameter(MAXITER_ID, new GreaterEqualConstraint(0), 0);
      if(config.grab(maxiterP)) {
        maxiter = maxiterP.getValue();
      }

      LongParameter seedP = new LongParameter(SEED_ID, true);
View Full Code Here

        super.makeOptions(config);
        Flag STYLE_CURVES_FLAG = new Flag(STYLE_CURVES_ID);
        if(config.grab(STYLE_CURVES_FLAG)) {
          curves = STYLE_CURVES_FLAG.getValue();
        }
        IntParameter HISTOGRAM_BINS_PARAM = new IntParameter(HISTOGRAM_BINS_ID, new GreaterEqualConstraint(2), DEFAULT_BINS);
        if(config.grab(HISTOGRAM_BINS_PARAM)) {
          bins = HISTOGRAM_BINS_PARAM.getValue();
        }
      }
View Full Code Here

    protected int samplesize = -1;
   
    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      IntParameter samplingP = new IntParameter(SAMPLING_ID, new GreaterEqualConstraint(-1), 10000);
      if(config.grab(samplingP)) {
        samplesize = samplingP.getValue();
      }
      StringParameter stylelibP = new StringParameter(STYLELIB_ID, PropertiesBasedStyleLibrary.DEFAULT_SCHEME_FILENAME);
      if(config.grab(stylelibP)) {
View Full Code Here

    protected double ralpha;

    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      DoubleParameter ralphaP = new DoubleParameter(EIGENPAIR_FILTER_RALPHA, new GreaterEqualConstraint(0.0), DEFAULT_RALPHA);
      if(config.grab(ralphaP)) {
        ralpha = ralphaP.getValue();
      }
    }
View Full Code Here

      Flag absoluteF = new Flag(EIGENPAIR_FILTER_ABSOLUTE);
      if(config.grab(absoluteF)) {
        absolute = absoluteF.getValue();
      }

      DoubleParameter deltaP = new DoubleParameter(EIGENPAIR_FILTER_DELTA, new GreaterEqualConstraint(0), DEFAULT_DELTA);
      if(config.grab(deltaP)) {
        delta = deltaP.getValue();
        // TODO: make this a global constraint?
        if(absolute && deltaP.tookDefaultValue()) {
          config.reportError(new WrongParameterValueException("Illegal parameter setting: " + "Flag " + absoluteF.getName() + " is set, " + "but no value for " + deltaP.getName() + " is specified."));
        }
      }

      // Conditional Constraint:
      // delta must be >= 0 and <= 1 if it's a relative value
      // Since relative or absolute is dependent on the absolute flag this is a
      // global constraint!
      List<ParameterConstraint<Number>> cons = new Vector<ParameterConstraint<Number>>();
      // TODO: Keep the constraint here - applies to non-conditional case as
      // well,
      // and is set above.
      ParameterConstraint<Number> aboveNull = new GreaterEqualConstraint(0);
      cons.add(aboveNull);
      ParameterConstraint<Number> underOne = new LessEqualConstraint(1);
      cons.add(underOne);

      GlobalParameterConstraint gpc = new ParameterFlagGlobalConstraint<Number, Double>(deltaP, cons, absoluteF, false);
View Full Code Here

      Flag nocenterF = new Flag(NOCENTER_ID);
      if(config.grab(nocenterF)) {
        nocenter = nocenterF.getValue();
      }

      DoubleParameter scaleP = new DoubleParameter(SCALE_ID, new GreaterEqualConstraint(0.0), 1.0);
      if(config.grab(scaleP)) {
        scale = scaleP.getValue();
      }
    }
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.GreaterEqualConstraint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.