java.util.PrimitiveIterator.OfDouble#nextDouble ( )源码实例Demo

下面列出了java.util.PrimitiveIterator.OfDouble#nextDouble ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: metanome-algorithms   文件: Dimensions.java
private static Dimension toDimension(DoubleSortedSet thresholds) {
	int size = thresholds.size();
	Double2IntMap map = new Double2IntOpenHashMap(size);
	int i = 1;
	OfDouble it = thresholds.iterator();
	while (it.hasNext()) {
		double threshold = it.nextDouble();
		map.put(threshold, i++);
	}
	return new Dimension(map);
}
 
源代码2 项目: metanome-algorithms   文件: IteratorUtils.java
public static OptionalDouble next(OfDouble it) {
	if (it.hasNext()) {
		double higher = it.nextDouble();
		return OptionalDouble.of(higher);
	}
	return OptionalDouble.empty();
}
 
源代码3 项目: metanome-algorithms   文件: UniformTrimmer.java
private void trim(OfDouble iterator) {
	while (iterator.hasNext()) {
		double current = iterator.nextDouble();
		if (current <= first - count * intervalSize) {
			double diff = first - current;
			count = Math.max(count, (int) (diff / intervalSize)) + 1;
		} else {
			iterator.remove();
		}
	}
}
 
 同类方法