当前位置: 首页>>代码示例>>Java>>正文


Java IntParameter类代码示例

本文整理汇总了Java中de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter的典型用法代码示例。如果您正苦于以下问题:Java IntParameter类的具体用法?Java IntParameter怎么用?Java IntParameter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IntParameter类属于de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters包,在下文中一共展示了IntParameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);

  ObjectParameter<IntrinsicDimensionalityEstimator> estP = new ObjectParameter<>(ESTIMATOR_ID, IntrinsicDimensionalityEstimator.class, ALIDEstimator.class);
  if(config.grab(estP)) {
    estimator = estP.instantiateClass(config);
  }

  IntParameter pKc = new IntParameter(KC_ID) //
      .addConstraint(new GreaterEqualConstraint(5));
  if(config.grab(pKc)) {
    k_c = pKc.getValue();
  }

  IntParameter pKr = new IntParameter(KR_ID) //
      .addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(pKr)) {
    k_r = pKr.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:22,代码来源:IDOS.java

示例2: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  DoubleParameter minsuppP = new DoubleParameter(MINSUPP_ID) //
  .addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(minsuppP)) {
    minsupp = minsuppP.getValue();
  }
  IntParameter minlengthP = new IntParameter(MINLENGTH_ID) //
  .setOptional(true) //
  .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(minlengthP)) {
    minlength = minlengthP.getValue();
  }
  IntParameter maxlengthP = new IntParameter(MAXLENGTH_ID) //
  .setOptional(true) //
  .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(maxlengthP)) {
    maxlength = maxlengthP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:22,代码来源:AbstractFrequentItemsetAlgorithm.java

示例3: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  IntParameter dimlatP = new IntParameter(LATDIM_ID) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
  if(config.grab(dimlatP)) {
    dimlat = dimlatP.getValue();
  }
  IntParameter dimlngP = new IntParameter(LNGDIM_ID) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
  if(config.grab(dimlngP)) {
    dimlng = dimlngP.getValue();
  }
  // Non-formalized parameter constraint:
  if(dimlat == dimlng) {
    config.reportError(new WrongParameterValueException("Parameters " + dimlatP.getName() + " and " + dimlngP.getName() + " should be different columns."));
  }
  ObjectParameter<EarthModel> modelP = new ObjectParameter<>(EarthModel.MODEL_ID, EarthModel.class, SphericalVincentyEarthModel.class);
  if(config.grab(modelP)) {
    model = modelP.instantiateClass(config);
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:23,代码来源:DimensionSelectingLatLngDistanceFunction.java

示例4: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final ObjectParameter<SimilarityFunction<V>> simP = new ObjectParameter<>(SIM_ID, SimilarityFunction.class, SharedNearestNeighborSimilarityFunction.class);
  if(config.grab(simP)) {
    similarityFunction = simP.instantiateClass(config);
  }

  final IntParameter knnP = new IntParameter(KNN_ID);
  knnP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(knnP)) {
    knn = knnP.getValue();
  }

  final DoubleParameter alphaP = new DoubleParameter(ALPHA_ID, 1.1);
  alphaP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(alphaP)) {
    alpha = alphaP.doubleValue();
  }

  final Flag modelsF = new Flag(MODELS_ID);
  if(config.grab(modelsF)) {
    models = modelsF.isTrue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:26,代码来源:SOD.java

示例5: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  ObjectParameter<DistanceFunction<O>> distanceFunctionP = new ObjectParameter<>(DISTANCE_FUNCTION_ID, DistanceFunction.class);
  if(config.grab(distanceFunctionP)) {
    distanceFunction = distanceFunctionP.instantiateClass(config);
    if(!distanceFunction.isMetric()) {
      LoggingUtil.warning("CoverTree requires a metric to be exact.");
    }
  }
  IntParameter truncateP = new IntParameter(TRUNCATE_ID, 10)//
  .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(truncateP)) {
    truncate = truncateP.intValue();
  }
  DoubleParameter expansionP = new DoubleParameter(EXPANSION_ID, 1.3)//
  .addConstraint(CommonConstraints.GREATER_THAN_ONE_DOUBLE);
  if(config.grab(expansionP)) {
    expansion = expansionP.doubleValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:22,代码来源:AbstractCoverTree.java

示例6: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  DoubleParameter windowP = new DoubleParameter(WINDOW_ID, 10.0);
  if(config.grab(windowP)) {
    window = windowP.getValue();
  }
  IntParameter projectionsP = new IntParameter(PROJECTIONS_ID);
  projectionsP.setOptional(true);
  projectionsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(projectionsP)) {
    projections = projectionsP.getValue();
  }

  ObjectParameter<RandomProjectionFamily> projP = new ObjectParameter<>(PROJECTION_ID, RandomProjectionFamily.class);
  projP.setOptional(true);
  if(config.grab(projP)) {
    proj = projP.instantiateClass(config);
  }
  RandomParameter randomP = new RandomParameter(RANDOM_ID);
  if(config.grab(randomP)) {
    random = randomP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:25,代码来源:NaiveProjectedKNNPreprocessor.java

示例7: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final IntParameter mP = new IntParameter(HiCS.Parameterizer.M_ID, 50);
  mP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(mP)) {
    m = mP.intValue();
  }

  final DoubleParameter alphaP = new DoubleParameter(HiCS.Parameterizer.ALPHA_ID, 0.1);
  alphaP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(alphaP)) {
    alpha = alphaP.doubleValue();
  }

  final ObjectParameter<GoodnessOfFitTest> testP = new ObjectParameter<>(HiCS.Parameterizer.TEST_ID, GoodnessOfFitTest.class, KolmogorovSmirnovTest.class);
  if(config.grab(testP)) {
    statTest = testP.instantiateClass(config);
  }

  final RandomParameter rndP = new RandomParameter(HiCS.Parameterizer.SEED_ID);
  if(config.grab(rndP)) {
    rnd = rndP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:26,代码来源:HiCSDependenceMeasure.java

示例8: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  RandomParameter randP = new RandomParameter(RANDOM_ID, RandomFactory.DEFAULT);
  if(config.grab(randP)) {
    random = randP.getValue();
  }

  DoubleParameter widthP = new DoubleParameter(WIDTH_ID);
  widthP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(widthP)) {
    width = widthP.doubleValue();
  }

  IntParameter lP = new IntParameter(NUMPROJ_ID);
  lP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(lP)) {
    k = lP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:21,代码来源:AbstractProjectedHashFunctionFamily.java

示例9: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  ObjectParameter<LocalitySensitiveHashFunctionFamily<? super V>> familyP = new ObjectParameter<>(FAMILY_ID, LocalitySensitiveHashFunctionFamily.class);
  if(config.grab(familyP)) {
    family = familyP.instantiateClass(config);
  }

  IntParameter lP = new IntParameter(L_ID);
  lP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(lP)) {
    l = lP.intValue();
  }

  IntParameter bucketsP = new IntParameter(BUCKETS_ID);
  bucketsP.setDefaultValue(7919); // Primes work best, apparently.
  bucketsP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(bucketsP)) {
    numberOfBuckets = bucketsP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:22,代码来源:InMemoryLSHIndex.java

示例10: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final IntParameter minptsP = new IntParameter(MINPTS_ID) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(minptsP)) {
    minpts = minptsP.getValue();
  }

  // parameter epsilon
  final DoubleListParameter epsilonP = new DoubleListParameter(EPSILON_ID, true) //
      .setDefaultValue(new double[] { DEFAULT_EPSILON }) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE_LIST);
  if(config.grab(epsilonP)) {
    epsilon = epsilonP.getValue().clone();
  }

  // parameter strategy
  final EnumParameter<Strategy> strategyP = new EnumParameter<>(STRATEGY_ID, Strategy.class, DEFAULT_STRATEGY);
  if(config.grab(strategyP)) {
    strategy = strategyP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:24,代码来源:DiSHPreferenceVectorIndex.java

示例11: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final DoubleParameter samplingP = new DoubleParameter(SAMPLING_ID);
  samplingP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  samplingP.addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE);
  samplingP.setOptional(true);
  if(config.grab(samplingP)) {
    sampling = samplingP.getValue();
  }
  final RandomParameter rndP = new RandomParameter(SEED_ID);
  rndP.setOptional(true);
  if(config.grab(rndP)) {
    seed = rndP.getValue();
  }
  final Flag includeP = new Flag(INCLUDESELF_ID);
  if(config.grab(includeP)) {
    includeSelf = includeP.isTrue();
  }
  IntParameter maxkP = new IntParameter(MAXK_ID) //
  .setOptional(true);
  if(config.grab(maxkP)) {
    maxk = maxkP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:26,代码来源:EvaluateRetrievalPerformance.java

示例12: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);

  IntParameter dimP = new IntParameter(ClassicMultidimensionalScalingTransform.Parameterizer.DIM_ID);
  if(config.grab(dimP)) {
    tdim = dimP.intValue();
  }

  ObjectParameter<PrimitiveDistanceFunction<? super I>> distP = new ObjectParameter<>(ClassicMultidimensionalScalingTransform.Parameterizer.DISTANCE_ID, PrimitiveDistanceFunction.class, SquaredEuclideanDistanceFunction.class);
  if(config.grab(distP)) {
    dist = distP.instantiateClass(config);
  }

  RandomParameter randP = new RandomParameter(RANDOM_ID);
  if(config.grab(randP)) {
    random = randP.getValue();
  }

  ObjectParameter<NumberVector.Factory<O>> factoryP = new ObjectParameter<>(ClassicMultidimensionalScalingTransform.Parameterizer.VECTOR_TYPE_ID, NumberVector.Factory.class, DoubleVector.Factory.class);
  if(config.grab(factoryP)) {
    factory = factoryP.instantiateClass(config);
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:25,代码来源:FastMultidimensionalScalingTransform.java

示例13: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final DoubleParameter rmaxP = new DoubleParameter(RMAX_ID);
  if(config.grab(rmaxP)) {
    rmax = rmaxP.doubleValue();
  }

  final IntParameter nminP = new IntParameter(NMIN_ID, 20);
  if(config.grab(nminP)) {
    nmin = nminP.intValue();
  }

  final DoubleParameter alphaP = new DoubleParameter(ALPHA_ID, 0.5);
  if(config.grab(alphaP)) {
    alpha = alphaP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:19,代码来源:LOCI.java

示例14: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  DoubleParameter epsilonP = new DoubleParameter(EPSILON_ID) //
      .addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(epsilonP)) {
    epsilon = epsilonP.getValue();
  }

  IntParameter minptsP = new IntParameter(MINPTS_ID) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(minptsP)) {
    minpts = minptsP.getValue();
    if(minpts <= 2) {
      LOG.warning("DBSCAN with minPts <= 2 is equivalent to single-link clustering at a single height. Consider using larger values of minPts.");
    }
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:19,代码来源:DBSCAN.java

示例15: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final IntParameter kP = new IntParameter(K_ID);
  kP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(kP)) {
    k = kP.getValue();
  }
  final DoubleParameter samplingP = new DoubleParameter(SAMPLING_ID);
  samplingP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  samplingP.addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE);
  samplingP.setOptional(true);
  if(config.grab(samplingP)) {
    sampling = samplingP.getValue();
  }
  final RandomParameter rndP = new RandomParameter(SEED_ID);
  if(config.grab(rndP)) {
    seed = rndP.getValue();
  }
  final Flag includeP = new Flag(INCLUDESELF_ID);
  if(config.grab(includeP)) {
    includeSelf = includeP.isTrue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:25,代码来源:AveragePrecisionAtK.java


注:本文中的de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。