本文整理汇总了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();
}
示例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));
}
}
示例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));
}
}
示例4: asSet
import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
DoubleSet asSet() {
return new DoubleOpenHashSet(data);
}
示例5: DoubleColumnPreIndexStatsCollector
import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet; //导入依赖的package包/类
public DoubleColumnPreIndexStatsCollector(FieldSpec spec) {
super(spec);
doubleSet = new DoubleOpenHashSet(1000);
}
示例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);
}
示例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();
}