Example usage for java.util.stream DoubleStream parallel

List of usage examples for java.util.stream DoubleStream parallel

Introduction

In this page you can find the example usage for java.util.stream DoubleStream parallel.

Prototype

@Override
    DoubleStream parallel();

Source Link

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream b = DoubleStream.of(1.1, 2.2, 3.3, 4.4, 5.5);
    b.parallel().forEach(System.out::println);
}

From source file:org.terracotta.statistics.derived.histogram.StripedHistogramFittingTest.java

@Override
protected Histogram histogram(double bias, int bars, DoubleStream data) {
    StripedHistogram hist = new StripedHistogram(bias, bars, Long.MAX_VALUE);
    data.parallel().forEach(d -> hist.event(d, 0));
    return hist;// ww w . j av a2 s .co  m
}