Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for Sum (0.13 sec)

  1. guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

      public void testSum() {
        assertThat(emptyAccumulator.sum()).isWithin(0.0).of(0.0);
        assertThat(emptyAccumulatorByAddAllEmptyIterable.sum()).isWithin(0.0).of(0.0);
        assertThat(emptyAccumulatorByAddAllEmptyStats.sum()).isWithin(0.0).of(0.0);
        assertThat(oneValueAccumulator.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
        assertThat(oneValueAccumulatorByAddAllEmptyStats.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 36.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/StatsTest.java

      }
    
      public void testSum() {
        assertThat(EMPTY_STATS_VARARGS.sum()).isEqualTo(0.0);
        assertThat(EMPTY_STATS_ITERABLE.sum()).isEqualTo(0.0);
        assertThat(ONE_VALUE_STATS.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
        assertThat(TWO_VALUES_STATS.sum()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN * 2);
        assertThat(MANY_VALUES_STATS_VARARGS.sum())
            .isWithin(ALLOWED_ERROR)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 32.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

      public void testSum() {
        assertThat(emptyAccumulator.sum()).isWithin(0.0).of(0.0);
        assertThat(emptyAccumulatorByAddAllEmptyIterable.sum()).isWithin(0.0).of(0.0);
        assertThat(emptyAccumulatorByAddAllEmptyStats.sum()).isWithin(0.0).of(0.0);
        assertThat(oneValueAccumulator.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
        assertThat(oneValueAccumulatorByAddAllEmptyStats.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 34K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/math/StatsTest.java

      }
    
      public void testSum() {
        assertThat(EMPTY_STATS_VARARGS.sum()).isEqualTo(0.0);
        assertThat(EMPTY_STATS_ITERABLE.sum()).isEqualTo(0.0);
        assertThat(ONE_VALUE_STATS.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
        assertThat(TWO_VALUES_STATS.sum()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN * 2);
        assertThat(MANY_VALUES_STATS_VARARGS.sum())
            .isWithin(ALLOWED_ERROR)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/PairedStatsTest.java

        assertThat(TWO_VALUES_PAIRED_STATS.sampleCovariance())
            .isWithin(ALLOWED_ERROR)
            .of(TWO_VALUES_SUM_OF_PRODUCTS_OF_DELTAS);
        assertThat(MANY_VALUES_PAIRED_STATS.sampleCovariance())
            .isWithin(ALLOWED_ERROR)
            .of(MANY_VALUES_SUM_OF_PRODUCTS_OF_DELTAS / (MANY_VALUES_COUNT - 1));
        assertThat(HORIZONTAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/PairedStatsTest.java

        assertThat(TWO_VALUES_PAIRED_STATS.sampleCovariance())
            .isWithin(ALLOWED_ERROR)
            .of(TWO_VALUES_SUM_OF_PRODUCTS_OF_DELTAS);
        assertThat(MANY_VALUES_PAIRED_STATS.sampleCovariance())
            .isWithin(ALLOWED_ERROR)
            .of(MANY_VALUES_SUM_OF_PRODUCTS_OF_DELTAS / (MANY_VALUES_COUNT - 1));
        assertThat(HORIZONTAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

        int expectedHashCode = 0;
        for (E element : getSampleElements()) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
            "A Set's hashCode() should be the sum of those of its elements.",
            expectedHashCode,
            getSet().hashCode());
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      @CollectionFeature.Require(ALLOWS_NULL_VALUES)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/LongAdder.java

        add(-1L);
      }
    
      /**
       * Returns the current sum. The returned value is NOT an atomic snapshot; invocation in
       * the absence of concurrent updates returns an accurate result, but concurrent updates that occur
       * while the sum is being calculated might not be incorporated.
       *
       * @return the sum
       */
      @Override
      public long sum() {
        long sum = base;
        Cell[] as = cells;
        if (as != null) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 5.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        }
      }
    
      /** getAndAccumulate with sum adds given value to current, and returns previous value */
      public void testGetAndAccumulateWithSum() {
        AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i : new int[] {0, SIZE - 1}) {
          for (double x : VALUES) {
            for (double y : VALUES) {
              aa.set(i, x);
              double z = aa.getAndAccumulate(i, y, Double::sum);
              assertBitEquals(x, z);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                    }
                  }));
        }
        threadPool.shutdown();
        assertTrue(threadPool.awaitTermination(300, SECONDS));
        long sum = 0;
        for (Future<Long> f : futures) {
          sum += f.get();
        }
        assertEquals(sum, map.get(key));
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top