Home
last modified time | relevance | path

Searched refs:DoubleStream (Results 1 – 25 of 51) sorted by relevance

123

/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java52 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(0.0, e -> 0.0).limit(10); in testZeroAverageOfNonEmptyStream()
77 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(base, e -> increment).limit(count); in testForCompenstation()
101 Map<Supplier<DoubleStream>, Double> testCases = new LinkedHashMap<>(); in testNonfiniteSum()
102 testCases.put(() -> DoubleStream.of(MAX_VALUE, MAX_VALUE), POSITIVE_INFINITY); in testNonfiniteSum()
103 testCases.put(() -> DoubleStream.of(-MAX_VALUE, -MAX_VALUE), NEGATIVE_INFINITY); in testNonfiniteSum()
105 testCases.put(() -> DoubleStream.of(1.0d, POSITIVE_INFINITY, 1.0d), POSITIVE_INFINITY); in testNonfiniteSum()
106 testCases.put(() -> DoubleStream.of(POSITIVE_INFINITY), POSITIVE_INFINITY); in testNonfiniteSum()
107 … testCases.put(() -> DoubleStream.of(POSITIVE_INFINITY, POSITIVE_INFINITY), POSITIVE_INFINITY); in testNonfiniteSum()
108 …testCases.put(() -> DoubleStream.of(POSITIVE_INFINITY, POSITIVE_INFINITY, 0.0), POSITIVE_INFINITY); in testNonfiniteSum()
110 testCases.put(() -> DoubleStream.of(1.0d, NEGATIVE_INFINITY, 1.0d), NEGATIVE_INFINITY); in testNonfiniteSum()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java77 public interface DoubleStream extends BaseStream<Double, DoubleStream> { interface
92 DoubleStream filter(DoublePredicate predicate); in filter()
106 DoubleStream map(DoubleUnaryOperator mapper); in map()
169 DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper); in flatMap()
181 DoubleStream distinct(); in distinct()
193 DoubleStream sorted(); in sorted()
224 DoubleStream peek(DoubleConsumer action); in peek()
251 DoubleStream limit(long maxSize); in limit()
280 DoubleStream skip(long n); in skip()
707 DoubleStream sequential(); in sequential()
[all …]
DDoublePipeline.java57 extends AbstractPipeline<E_IN, Double, DoubleStream>
58 implements DoubleStream {
196 public final DoubleStream map(DoubleUnaryOperator mapper) { in map()
268 public final DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper) {
282 try (DoubleStream result = mapper.apply(t)) {
294 public DoubleStream unordered() {
307 public final DoubleStream filter(DoublePredicate predicate) {
331 public final DoubleStream peek(DoubleConsumer action) {
352 public final DoubleStream limit(long maxSize) {
359 public final DoubleStream skip(long n) {
[all …]
DStreamSupport.java272 public static DoubleStream doubleStream(Spliterator.OfDouble spliterator, in doubleStream()
311 public static DoubleStream doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, in doubleStream()
DStream.java226 DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper); in mapToDouble()
330 DoubleStream flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper); in flatMapToDouble()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DDoubleStreamTestScenario.java52 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_FOR_EACH_WITH_CLOSE()
53 DoubleStream s = m.apply(data.stream()); in STREAM_FOR_EACH_WITH_CLOSE()
64 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_TO_ARRAY()
73 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_ITERATOR()
82 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR()
91 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
99 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_FOREACH()
106 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_SEQUENTIAL_FOR_EACH()
114 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_FOR_EACH_ORDERED()
123 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_SPLITERATOR()
[all …]
DTestData.java75 public interface OfDouble extends TestData<Double, DoubleStream> { }
189 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { in ofDoubleSupplier()
332 extends AbstractTestData<Double, DoubleStream, I, Spliterator.OfDouble>
337 Function<I, DoubleStream> streamFn, in DoubleTestData()
338 Function<I, DoubleStream> parStreamFn, in DoubleTestData()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DDoubleStreamTestScenario.java48 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_FOR_EACH_WITH_CLOSE()
49 DoubleStream s = m.apply(data.stream()); in STREAM_FOR_EACH_WITH_CLOSE()
60 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_TO_ARRAY()
69 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_ITERATOR()
78 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR()
87 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_WITH_MIXED_TRAVERSE_AND_SPLIT()
95 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in STREAM_SPLITERATOR_FOREACH()
102 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_SEQUENTIAL_FOR_EACH()
110 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_FOR_EACH_ORDERED()
119 void _run(TestData<T, S_IN> data, DoubleConsumer b, Function<S_IN, DoubleStream> m) { in PAR_STREAM_SPLITERATOR()
[all …]
DTestData.java74 public interface OfDouble extends TestData<Double, DoubleStream> { }
188 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { in ofDoubleSupplier()
331 extends AbstractTestData<Double, DoubleStream, I, Spliterator.OfDouble>
336 Function<I, DoubleStream> streamFn, in DoubleTestData()
337 Function<I, DoubleStream> parStreamFn, in DoubleTestData()
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DStreamReuseTest.java357 … (DoubleStream s) -> s.mapToObj(i -> i), (DoubleStream s) -> s.mapToObj(i -> i), in testTwoStreams()
361 DoubleStream::distinct, (DoubleStream s) -> s.mapToObj(i -> i), in testTwoStreams()
365 (DoubleStream s) -> s.mapToObj(i -> i), DoubleStream::distinct, in testTwoStreams()
369 DoubleStream::distinct, DoubleStream::distinct, in testTwoStreams()
377 DoubleStream::sum, DoubleStream::sum, in testTwoTerminals()
385 DoubleStream::sum, (DoubleStream s) -> s.mapToObj(i -> i), in testTerminalStream()
389 (DoubleStream s) -> s.mapToObj(i -> i), DoubleStream::sum, in testTerminalStream()
393 DoubleStream::sum, DoubleStream::distinct, in testTerminalStream()
397 DoubleStream::distinct, DoubleStream::sum, in testTerminalStream()
405 DoubleStream::iterator, DoubleStream::iterator, in testTwoIterators()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DConcatOpTest.java36 import java.util.stream.DoubleStream;
54 … s -> DoubleStream.concat(s, data.stream().mapToDouble(Integer::doubleValue))); in testOps()
112 assertSized(DoubleStream.concat( in testDoubleSize()
116 assertUnsized(DoubleStream.concat( in testDoubleSize()
120 assertUnsized(DoubleStream.concat( in testDoubleSize()
122 DoubleStream.iterate(0, i -> i + 1))); in testDoubleSize()
124 assertUnsized(DoubleStream.concat( in testDoubleSize()
125 DoubleStream.iterate(0, i -> i + 1), in testDoubleSize()
DDoublePrimitiveOpsTests.java30 import java.util.stream.DoubleStream;
60 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSort()
78 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSortSort()
97 double[] actual = DoubleStream.iterate(1.0, i -> i + 1.0).limit(9).toArray(); in testLimit()
DStreamSpliteratorTest.java44 import java.util.stream.DoubleStream;
528 List<Consumer<DoubleStream>> terminalOps = Arrays.asList( in testDoubleSplitting()
534 List<UnaryOperator<DoubleStream>> intermediateOps = Arrays.asList( in testDoubleSplitting()
541 Consumer<DoubleStream> terminalOp = terminalOps.get(i); in testDoubleSplitting()
544 UnaryOperator<DoubleStream> intermediateOp = intermediateOps.get(j); in testDoubleSplitting()
552 DoubleStream s = StreamSupport.doubleStream(psp, true); in testDoubleSplitting()
572 for (Function<DoubleStream, DoubleStream> f : doubleStreamFunctions()) {
575 DoubleStream out = f.apply(in);
582 DoubleStream out = f.apply(in);
591 for (Function<DoubleStream, DoubleStream> f : doubleStreamFunctions()) { in testDoubleSpliterators()
[all …]
DStreamBuilderTest.java37 import java.util.stream.DoubleStream;
263 … TestData.OfDouble data = TestData.Factory.ofDoubleSupplier("[0, 1)", () -> DoubleStream.of(1)); in testDoubleSingleton()
278 DoubleStream.Builder sb = DoubleStream.builder(); in testDoubleAfterBuilding()
290 DoubleStream.Builder sb = DoubleStream.builder(); in testDoubleStreamBuilder()
296 DoubleStream.Builder sb = DoubleStream.builder(); in testDoubleStreamBuilder()
298 DoubleStream.Builder _sb = sb.add(i); in testDoubleStreamBuilder()
305 private void testDoubleStreamBuilder(int size, Function<Integer, DoubleStream> supplier) { in testDoubleStreamBuilder()
DInfiniteStreamWithLimitOpTest.java45 import java.util.stream.DoubleStream;
109 (UnaryOperator<DoubleStream>) s -> s.limit(SKIP_LIMIT_SIZE)}); in doubleSliceFunctionsDataProvider()
111 (UnaryOperator<DoubleStream>) s -> s.skip(SKIP_LIMIT_SIZE).limit(SKIP_LIMIT_SIZE)}); in doubleSliceFunctionsDataProvider()
213 public void testDoubleSubsizedWithRange(String description, UnaryOperator<DoubleStream> fs) {
260 public void testDoubleUnorderedFinite(String description, UnaryOperator<DoubleStream> fs) {
343 …oid testDoubleUnorderedSizedNotSubsizedFinite(String description, UnaryOperator<DoubleStream> fs) {
391 public void testDoubleUnorderedGenerator(String description, UnaryOperator<DoubleStream> fs) {
394 "[1.0, 1.0, ...]", () -> DoubleStream.generate(() -> 1.0));
444 public void testDoubleUnorderedIteration(String description, UnaryOperator<DoubleStream> fs) {
447 "[1.0, 2.0, 3.0, ...]", () -> DoubleStream.iterate(1, i -> i + 1));
DToArrayOpTest.java41 import java.util.stream.DoubleStream;
378 … double[] doubles = exerciseTerminalOps(data, s -> s.sorted(), (DoubleStream s) -> s.toArray());
401 private List<Function<DoubleStream, DoubleStream>> doubleUniqueAndSortedPermutations =
411 for (Function<DoubleStream, DoubleStream> f : doubleUniqueAndSortedPermutations) {
416 private List<Function<DoubleStream, DoubleStream>> doubleStatefulOpPermutations =
425 for (Function<DoubleStream, DoubleStream> f : doubleStatefulOpPermutations) {
DMinMaxTest.java41 import java.util.stream.DoubleStream;
94 assertEquals(DoubleStream.empty().min(), OptionalDouble.empty()); in testDoubleMinMax()
95 assertEquals(DoubleStream.empty().max(), OptionalDouble.empty()); in testDoubleMinMax()
DCountTest.java41 import java.util.stream.DoubleStream;
89 terminal(DoubleStream::count). in testOps()
DSortedOpTest.java41 import java.util.stream.DoubleStream;
85 Function<LongStream, DoubleStream> f = s -> in testDoubleStreamTooLarge()
90 testStreamTooLarge(f, DoubleStream::findFirst); in testDoubleStreamTooLarge()
174 … exerciseOpsInt(data, Stream::sorted, IntStream::sorted, LongStream::sorted, DoubleStream::sorted); in testOps()
321 Function<Integer, DoubleStream> knownSize = i -> assertNCallsOnly( in testDoubleSequentialShortCircuitTerminal()
323 Function<Integer, DoubleStream> unknownSize = i -> assertNCallsOnly in testDoubleSequentialShortCircuitTerminal()
341 private DoubleStream unknownSizeDoubleStream(double[] a) { in unknownSizeDoubleStream()
DFindFirstOpTest.java32 import java.util.stream.DoubleStream;
127 void exerciseDoubleStream(TestData.OfDouble data, Function<DoubleStream, DoubleStream> fs) { in exerciseDoubleStream() argument
DStreamLinkTest.java38 import java.util.stream.DoubleStream;
106 stream(apply(n, (DoubleStream s) -> s.map(e -> e + 1.0))). in testDoubleManyStreams()
DFindAnyOpTest.java40 import java.util.stream.DoubleStream;
146 void exerciseDoubleStream(TestData.OfDouble data, Function<DoubleStream, DoubleStream> fs) { in exerciseDoubleStream() argument
/libcore/ojluni/annotations/hiddenapi/java/util/
DRandom.java136 public java.util.stream.DoubleStream doubles(long streamSize) { in doubles()
140 public java.util.stream.DoubleStream doubles() { in doubles()
144 public java.util.stream.DoubleStream doubles( in doubles()
149 public java.util.stream.DoubleStream doubles( in doubles()
/libcore/ojluni/src/main/java/java/util/
DSplittableRandom.java32 import java.util.stream.DoubleStream;
744 public DoubleStream doubles(long streamSize) { in doubles()
763 public DoubleStream doubles() { in doubles()
786 public DoubleStream doubles(long streamSize, double randomNumberOrigin, in doubles()
813 public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { in doubles()
DRandom.java32 import java.util.stream.DoubleStream;
885 public DoubleStream doubles(long streamSize) { in doubles()
908 public DoubleStream doubles() { in doubles()
942 public DoubleStream doubles(long streamSize, double randomNumberOrigin, in doubles()
981 public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { in doubles()

123