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


Java DoubleOpenHashSet类代码示例

本文整理汇总了Java中it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet的典型用法代码示例。如果您正苦于以下问题:Java DoubleOpenHashSet类的具体用法?Java DoubleOpenHashSet怎么用?Java DoubleOpenHashSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DoubleOpenHashSet类属于it.unimi.dsi.fastutil.doubles包,在下文中一共展示了DoubleOpenHashSet类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: countUnique

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
@Override
public int countUnique() {
    DoubleSet doubles = new DoubleOpenHashSet();
    for (int i = 0; i < size(); i++) {
        doubles.add(data.getDouble(i));
    }
    return doubles.size();
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:9,代码来源:DoubleColumn.java

示例2: DoubleRawValueBasedNotInPredicateEvaluator

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
DoubleRawValueBasedNotInPredicateEvaluator(NotInPredicate notInPredicate) {
  String[] values = notInPredicate.getValues();
  _nonMatchingValues = new DoubleOpenHashSet(values.length);
  for (String value : values) {
    _nonMatchingValues.add(Double.parseDouble(value));
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:8,代码来源:NotInPredicateEvaluatorFactory.java

示例3: DoubleRawValueBasedInPredicateEvaluator

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
DoubleRawValueBasedInPredicateEvaluator(InPredicate inPredicate) {
  String[] values = inPredicate.getValues();
  _matchingValues = new DoubleOpenHashSet(values.length);
  for (String value : values) {
    _matchingValues.add(Double.parseDouble(value));
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:8,代码来源:InPredicateEvaluatorFactory.java

示例4: asSet

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
DoubleSet asSet() {
    return new DoubleOpenHashSet(data);
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:4,代码来源:DoubleColumn.java

示例5: DoubleColumnPreIndexStatsCollector

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
public DoubleColumnPreIndexStatsCollector(FieldSpec spec) {
  super(spec);
  doubleSet = new DoubleOpenHashSet(1000);
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:5,代码来源:DoubleColumnPreIndexStatsCollector.java

示例6: DoubleColumnPreIndexStatsCollector

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
public DoubleColumnPreIndexStatsCollector(String column, StatsCollectorConfig statsCollectorConfig) {
  super(column, statsCollectorConfig);
  rawDoubleSet = new DoubleOpenHashSet(INITIAL_HASH_SET_SIZE);
  aggregatedDoubleSet = new DoubleOpenHashSet(INITIAL_HASH_SET_SIZE);
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:6,代码来源:DoubleColumnPreIndexStatsCollector.java

示例7: setUp

import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
@BeforeClass
public void setUp()
    throws Exception {
  FileUtils.deleteQuietly(TEMP_DIR);

  IntOpenHashSet intSet = new IntOpenHashSet();
  while (intSet.size() < NUM_VALUES) {
    intSet.add(RANDOM.nextInt());
  }
  _intValues = intSet.toIntArray();
  Arrays.sort(_intValues);

  LongOpenHashSet longSet = new LongOpenHashSet();
  while (longSet.size() < NUM_VALUES) {
    longSet.add(RANDOM.nextLong());
  }
  _longValues = longSet.toLongArray();
  Arrays.sort(_longValues);

  FloatOpenHashSet floatSet = new FloatOpenHashSet();
  while (floatSet.size() < NUM_VALUES) {
    floatSet.add(RANDOM.nextFloat());
  }
  _floatValues = floatSet.toFloatArray();
  Arrays.sort(_floatValues);

  DoubleOpenHashSet doubleSet = new DoubleOpenHashSet();
  while (doubleSet.size() < NUM_VALUES) {
    doubleSet.add(RANDOM.nextDouble());
  }
  _doubleValues = doubleSet.toDoubleArray();
  Arrays.sort(_doubleValues);

  Set<String> stringSet = new HashSet<>();
  while (stringSet.size() < NUM_VALUES) {
    stringSet.add(RandomStringUtils.random(RANDOM.nextInt(MAX_STRING_LENGTH)).replace('\0', ' '));
  }
  _stringValues = stringSet.toArray(new String[NUM_VALUES]);
  Arrays.sort(_stringValues);

  boolean[] isSorted = {true};
  SegmentDictionaryCreator dictionaryCreator = new SegmentDictionaryCreator(false, _intValues,
      new DimensionFieldSpec(INT_COLUMN_NAME, FieldSpec.DataType.INT, true), TEMP_DIR, '\0');
  dictionaryCreator.build(isSorted);

  dictionaryCreator = new SegmentDictionaryCreator(false, _longValues,
      new DimensionFieldSpec(LONG_COLUMN_NAME, FieldSpec.DataType.LONG, true), TEMP_DIR, '\0');
  dictionaryCreator.build(isSorted);

  dictionaryCreator = new SegmentDictionaryCreator(false, _floatValues,
      new DimensionFieldSpec(FLOAT_COLUMN_NAME, FieldSpec.DataType.FLOAT, true), TEMP_DIR, '\0');
  dictionaryCreator.build(isSorted);

  dictionaryCreator = new SegmentDictionaryCreator(false, _doubleValues,
      new DimensionFieldSpec(DOUBLE_COLUMN_NAME, FieldSpec.DataType.DOUBLE, true), TEMP_DIR, '\0');
  dictionaryCreator.build(isSorted);

  dictionaryCreator = new SegmentDictionaryCreator(false, _stringValues,
      new DimensionFieldSpec(STRING_COLUMN_NAME, FieldSpec.DataType.STRING, true), TEMP_DIR, '\0');
  dictionaryCreator.build(isSorted);
  _numBytesPerStringValue = dictionaryCreator.getStringColumnMaxLength();
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:63,代码来源:ImmutableDictionaryReaderTest.java


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