Searched defs:sum (Results 1 - 20 of 20) sorted by relevance

/libcore/support/src/test/java/tests/util/
H A DSummaryStatistics.java24 private double sum; field in class:SummaryStatistics
41 sum += value - lastValue;
49 return sum / numValues;
/libcore/ojluni/src/main/java/java/util/
H A DDoubleSummaryStatistics.java30 * A state object for collecting statistics such as count, min, max, sum, and
52 * maximum, sum, and average of their weights.
64 private double sum; field in class:DoubleSummaryStatistics
65 private double sumCompensation; // Low order bits of sum
66 private double simpleSum; // Used to compute right sum for non-finite inputs
71 * Construct an empty instance with zero count, zero sum,
101 sumWithCompensation(other.sum);
113 double velvel = sum + tmp; // Little wolf of rounding error
114 sumCompensation = (velvel - sum) - tmp;
115 sum
[all...]
H A DIntSummaryStatistics.java30 * A state object for collecting statistics such as count, min, max, sum, and
52 * maximum, sum, and average of their number of dependents.
61 * <p>This implementation does not check for overflow of the sum.
66 private long sum; field in class:IntSummaryStatistics
71 * Construct an empty instance with zero count, zero sum,
85 sum += value;
98 sum += other.sum;
113 * Returns the sum of values recorded, or zero if no values have been
116 * @return the sum o
[all...]
H A DLongSummaryStatistics.java31 * A state object for collecting statistics such as count, min, max, sum, and
53 * maximum, sum, and average of their ages.
62 * <p>This implementation does not check for overflow of the sum.
67 private long sum; field in class:LongSummaryStatistics
72 * Construct an empty instance with zero count, zero sum,
96 sum += value;
110 sum += other.sum;
125 * Returns the sum of values recorded, or zero if no values have been
128 * @return the sum o
[all...]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
H A DDoubleAdder.java13 * {@code double} sum. When updates (method {@link #add}) are
15 * to reduce contention. Method {@link #sum} (or, equivalently {@link
17 * variables maintaining the sum. The order of accumulation within or
50 * Creates a new adder with initial sum of zero.
77 * Returns the current sum. The returned value is <em>NOT</em> an
80 * occur while the sum is being calculated might not be
86 * @return the sum
88 public double sum() { method in class:DoubleAdder
90 double sum = Double.longBitsToDouble(base);
94 sum
[all...]
H A DLongAdder.java13 * {@code long} sum. When updates (method {@link #add}) are contended
15 * contention. Method {@link #sum} (or, equivalently, {@link
17 * variables maintaining the sum.
20 * multiple threads update a common sum that is used for purposes such
46 * Creates a new adder with initial sum of zero.
82 * Returns the current sum. The returned value is <em>NOT</em> an
85 * occur while the sum is being calculated might not be
88 * @return the sum
90 public long sum() { method in class:LongAdder
92 long sum
[all...]
/libcore/ojluni/src/main/native/
H A Dnet_util.c252 int sum = 0; local
256 sum += *w++;
262 sum += answer;
265 sum = (sum >> 16) + (sum & 0xffff);
266 sum += (sum >> 16);
267 answer = ~sum;
/libcore/ojluni/src/main/java/java/lang/
H A DDouble.java1024 * @return the sum of {@code a} and {@code b}
1029 public static double sum(double a, double b) { method in class:Double
H A DFloat.java928 * @return the sum of {@code a} and {@code b}
933 public static float sum(float a, float b) { method in class:Float
H A DLong.java1224 * @return the sum of {@code a} and {@code b}
1228 public static long sum(long a, long b) { method in class:Long
H A DInteger.java1298 * @return the sum of {@code a} and {@code b}
1302 public static int sum(int a, int b) { method in class:Integer
/libcore/ojluni/src/main/java/java/util/stream/
H A DDoubleStream.java56 * {@link Stream} and {@link DoubleStream}, computing the sum of the weights of the
60 * double sum = widgets.stream()
63 * .sum();
214 * .sum();
350 * double sum = numbers.reduce(0, (a, b) -> a+b);
356 * double sum = numbers.reduce(0, Double::sum);
370 * @see #sum()
456 * Returns the sum of elements in this stream.
464 * return reduce(0, Double::sum);
494 double sum(); method in interface:DoubleStream
[all...]
H A DDoublePipeline.java380 public final double sum() { method in class:DoublePipeline
383 * holds the high-order bits of the running sum, index 1 holds
384 * the low-order bits of the sum computed via compensated
385 * summation, and index 2 holds the simple sum used to compute
426 * holds the high-order bits of the running sum, index 1 holds
427 * the low-order bits of the sum computed via compensated
429 * holds the simple sum.
450 return mapToLong(e -> 1L).sum();
H A DIntPipeline.java414 public final int sum() { method in class:IntPipeline
415 return reduce(0, Integer::sum);
430 return mapToLong(e -> 1L).sum();
H A DIntStream.java54 * {@link Stream} and {@link IntStream}, computing the sum of the weights of the
58 * int sum = widgets.stream()
61 * .sum();
209 * .sum();
345 * int sum = integers.reduce(0, (a, b) -> a+b);
351 * int sum = integers.reduce(0, Integer::sum);
365 * @see #sum()
450 * Returns the sum of elements in this stream. This is a special case
454 * return reduce(0, Integer::sum);
462 int sum(); method in interface:IntStream
[all...]
H A DLongPipeline.java395 public final long sum() { method in class:LongPipeline
397 return reduce(0, Long::sum);
428 return map(e -> 1L).sum();
H A DLongStream.java58 * {@link Stream} and {@link LongStream}, computing the sum of the weights of the
62 * long sum = widgets.stream()
65 * .sum();
213 * .sum();
349 * long sum = integers.reduce(0, (a, b) -> a+b);
355 * long sum = integers.reduce(0, Long::sum);
369 * @see #sum()
454 * Returns the sum of elements in this stream. This is a special case
458 * return reduce(0, Long::sum);
466 long sum(); method in interface:LongStream
[all...]
/libcore/luni/src/main/native/
H A Dcbigint.cpp686 uint64_t intermediate, carry1, carry2, prod1, prod2, sum; local
702 sum = intermediate + prod1;
703 if ((sum < prod1) || (sum < intermediate))
715 intermediate = carry2 + HIGH_IN_U64 (sum) + prod1 + prod2;
724 LOW_U32_FROM_PTR (pArg1) = LOW_U32_FROM_VAR (sum);
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
H A DLambdaTestHelpers.java184 public static void assertCountSum(Stream<? super Integer> it, int count, int sum) { argument
185 assertCountSum(it.iterator(), count, sum);
188 public static void assertCountSum(Iterable<? super Integer> it, int count, int sum) { argument
189 assertCountSum(it.iterator(), count, sum);
192 public static void assertCountSum(Iterator<? super Integer> it, int count, int sum) { argument
202 assertEquals(s, sum);
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
H A DLambdaTestHelpers.java185 public static void assertCountSum(Stream<? super Integer> it, int count, int sum) { argument
186 assertCountSum(it.iterator(), count, sum);
189 public static void assertCountSum(Iterable<? super Integer> it, int count, int sum) { argument
190 assertCountSum(it.iterator(), count, sum);
193 public static void assertCountSum(Iterator<? super Integer> it, int count, int sum) { argument
203 assertEquals(s, sum);

Completed in 253 milliseconds