本文整理汇总了Java中it.unimi.dsi.fastutil.doubles.DoubleArrayList.addAll方法的典型用法代码示例。如果您正苦于以下问题:Java DoubleArrayList.addAll方法的具体用法?Java DoubleArrayList.addAll怎么用?Java DoubleArrayList.addAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类it.unimi.dsi.fastutil.doubles.DoubleArrayList
的用法示例。
在下文中一共展示了DoubleArrayList.addAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: combine
import it.unimi.dsi.fastutil.doubles.DoubleArrayList; //导入方法依赖的package包/类
@Override
public List<DoubleArrayList> combine(List<DoubleArrayList> aggregationResultList, CombineLevel combineLevel) {
if ((aggregationResultList == null) || aggregationResultList.isEmpty()) {
return null;
}
DoubleArrayList list = new DoubleArrayList();
for (DoubleArrayList aggregationResult : aggregationResultList) {
list.addAll(aggregationResult);
}
aggregationResultList.clear();
aggregationResultList.add(list);
return aggregationResultList;
}
示例2: combineTwoValues
import it.unimi.dsi.fastutil.doubles.DoubleArrayList; //导入方法依赖的package包/类
@Override
public DoubleArrayList combineTwoValues(DoubleArrayList aggregationResult0, DoubleArrayList aggregationResult1) {
if (aggregationResult0 == null) {
return aggregationResult1;
}
if (aggregationResult1 == null) {
return aggregationResult0;
}
aggregationResult0.addAll(aggregationResult1);
return aggregationResult0;
}
示例3: reduce
import it.unimi.dsi.fastutil.doubles.DoubleArrayList; //导入方法依赖的package包/类
/**
* naive and slow implementation
* @param combinedResultList
* @return
*/
@Override
public Double reduce(List<DoubleArrayList> combinedResultList) {
if ((combinedResultList == null) || combinedResultList.isEmpty()) {
return 0.0;
}
DoubleArrayList list = new DoubleArrayList();
for (DoubleArrayList aggregationResult : combinedResultList) {
list.addAll(aggregationResult);
}
return PercentileUtil.getValueOnPercentile(list, _percentile);
}
示例4: merge
import it.unimi.dsi.fastutil.doubles.DoubleArrayList; //导入方法依赖的package包/类
@Nonnull
@Override
public DoubleArrayList merge(@Nonnull DoubleArrayList intermediateResult1,
@Nonnull DoubleArrayList intermediateResult2) {
intermediateResult1.addAll(intermediateResult2);
return intermediateResult1;
}