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


Java IntParameter.intValue方法代码示例

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


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

示例1: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  IntParameter kP = new IntParameter(K_ID);
  if(config.grab(kP)) {
    k = kP.intValue();
  }
  ObjectParameter<DatabaseConnection> queryP = new ObjectParameter<>(QUERY_ID, DatabaseConnection.class);
  queryP.setOptional(true);
  if(config.grab(queryP)) {
    queries = queryP.instantiateClass(config);
  }
  DoubleParameter samplingP = new DoubleParameter(SAMPLING_ID);
  samplingP.setOptional(true);
  if(config.grab(samplingP)) {
    sampling = samplingP.doubleValue();
  }
  RandomParameter randomP = new RandomParameter(RANDOM_ID, RandomFactory.DEFAULT);
  if(config.grab(randomP)) {
    random = randomP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:23,代码来源:KNNBenchmarkAlgorithm.java

示例2: 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

示例3: 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

示例4: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  IntParameter kP = new IntParameter(KMeans.K_ID);
  kP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(kP)) {
    k = kP.intValue();
  }

  ObjectParameter<KMedoidsInitialization<V>> initialP = new ObjectParameter<>(KMeans.INIT_ID, KMedoidsInitialization.class, FarthestPointsInitialMeans.class);
  if(config.grab(initialP)) {
    initializer = initialP.instantiateClass(config);
  }

  IntParameter maxiterP = new IntParameter(KMeans.MAXITER_ID, 0);
  maxiterP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
  if(config.grab(maxiterP)) {
    maxiter = maxiterP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:21,代码来源:KMedoidsEM.java

示例5: 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(DIM_ID);
  if(config.grab(dimP)) {
    tdim = dimP.intValue();
  }

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

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

示例6: 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

示例7: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  IntParameter numsamplesP = new IntParameter(NUMSAMPLES_ID, 5) //
      .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(numsamplesP)) {
    numsamples = numsamplesP.intValue();
  }

  // Default sample size suggested by Kaufman and Rousseeuw
  DoubleParameter samplingP = new DoubleParameter(SAMPLESIZE_ID, 40 + 2 * k) //
      .addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(samplingP)) {
    sampling = samplingP.doubleValue();
  }

  RandomParameter randomP = new RandomParameter(RANDOM_ID);
  if(config.grab(randomP)) {
    random = randomP.getValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:22,代码来源:CLARA.java

示例8: 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(M_ID, 50);
  mP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(mP)) {
    m = mP.intValue();
  }

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

  final ObjectParameter<OutlierAlgorithm> algoP = new ObjectParameter<>(ALGO_ID, OutlierAlgorithm.class, LOF.class);
  if(config.grab(algoP)) {
    outlierAlgorithm = algoP.instantiateClass(config);
  }

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

  final IntParameter cutoffP = new IntParameter(LIMIT_ID, 100);
  cutoffP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(cutoffP)) {
    cutoff = cutoffP.intValue();
  }

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

示例9: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  IntParameter digitsP = new IntParameter(DIGITS_ID, 4);
  digitsP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);

  if(config.grab(digitsP)) {
    int digits = digitsP.intValue();
    nf = NumberFormat.getInstance(Locale.ROOT);
    nf.setGroupingUsed(false);
    nf.setMaximumFractionDigits(digits);
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:14,代码来源:TooltipScoreVisualization.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 kcompP = new IntParameter(KCOMP_ID);
  kcompP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(kcompP)) {
    kcomp = kcompP.intValue();
  }

  final ObjectParameter<DistanceFunction<O>> compDistP = new ObjectParameter<>(COMPARISON_DISTANCE_FUNCTION_ID, DistanceFunction.class, EuclideanDistanceFunction.class);
  if(config.grab(compDistP)) {
    comparisonDistanceFunction = compDistP.instantiateClass(config);
  }

  final IntParameter kreachP = new IntParameter(KREACH_ID);
  kreachP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  kreachP.setOptional(true);
  if(config.grab(kreachP)) {
    kreach = kreachP.intValue();
  }
  else {
    kreach = kcomp;
  }

  final ObjectParameter<DistanceFunction<O>> reachDistP = new ObjectParameter<>(REACHABILITY_DISTANCE_FUNCTION_ID, DistanceFunction.class, true);
  if(config.grab(reachDistP)) {
    reachabilityDistanceFunction = reachDistP.instantiateClass(config);
  }

  // TODO: make default 1.0?
  final DoubleParameter lambdaP = new DoubleParameter(LAMBDA_ID, 2.0);
  lambdaP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
  if(config.grab(lambdaP)) {
    lambda = lambdaP.doubleValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:37,代码来源:LoOP.java

示例11: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  ObjectListParameter<SpatialSorter> curveP = new ObjectListParameter<>(CURVES_ID, SpatialSorter.class);
  if(config.grab(curveP)) {
    curvegen = curveP.instantiateClasses(config);
  }
  DoubleParameter windowP = new DoubleParameter(WINDOW_ID, 10.0);
  if(config.grab(windowP)) {
    window = windowP.getValue();
  }
  IntParameter variantsP = new IntParameter(VARIANTS_ID, 1);
  variantsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(variantsP)) {
    variants = variantsP.getValue();
  }
  IntParameter dimP = new IntParameter(DIM_ID);
  dimP.setOptional(true);
  dimP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
  if(config.grab(dimP)) {
    odim = dimP.intValue();
  }

  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,代码行数:34,代码来源:SpacefillingKNNPreprocessor.java

示例12: makeOptions

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

  IntParameter nuP = new IntParameter(NU_ID);
  if(config.grab(nuP)) {
    nu = nuP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:10,代码来源:StudentsTDistribution.java

示例13: 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) //
      .addConstraint(new GreaterEqualConstraint(3));
  if(config.grab(kP)) {
    k = kP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:10,代码来源:FastABOD.java

示例14: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  final IntParameter externalIdIndexParam = new IntParameter(EXTERNALID_INDEX_ID);
  if(config.grab(externalIdIndexParam)) {
    externalIdIndex = externalIdIndexParam.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:9,代码来源:ExternalIDFilter.java

示例15: makeOptions

import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
  super.makeOptions(config);
  ObjectParameter<NumberVectorDistanceFunction<? super V>> distanceFunctionP = makeParameterDistanceFunction(SquaredEuclideanDistanceFunction.class, NumberVectorDistanceFunction.class);
  if(config.grab(distanceFunctionP)) {
    distanceFunction = distanceFunctionP.instantiateClass(config);
    if(!(distanceFunction instanceof EuclideanDistanceFunction) && !(distanceFunction instanceof SquaredEuclideanDistanceFunction)) {
      LOG.warning("k-means optimizes the sum of squares - it should be used with squared euclidean distance and may stop converging otherwise!");
    }
  }

  IntParameter kP = new IntParameter(K_ID);
  kP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
  if(config.grab(kP)) {
    k = kP.getValue();
  }

  ObjectParameter<KMeansInitialization<V>> initialP = new ObjectParameter<>(INIT_ID, KMeansInitialization.class, KMeansPlusPlusInitialMeans.class);
  if(config.grab(initialP)) {
    initializer = initialP.instantiateClass(config);
  }

  IntParameter maxiterP = new IntParameter(MAXITER_ID, -1);
  maxiterP.addConstraint(CommonConstraints.GREATER_EQUAL_MINUSONE_INT);
  if(config.grab(maxiterP)) {
    maxiter = maxiterP.intValue();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:29,代码来源:SameSizeKMeansAlgorithm.java


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