Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 94 for nextLine (0.09 sec)

  1. guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

        for (int i = 0; i < reps; i++) {
          dummy += cache.getUnchecked(nextRandomKey());
        }
        requests.addAndGet(reps);
        return dummy;
      }
    
      private int nextRandomKey() {
        int a = random.nextInt(max);
    
        /*
         * For example, if concentration=2.0, the following takes the square root of
         * the uniformly-distributed random integer, then truncates any fractional
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

     *
     * @author Colin Decker
     */
    public class ChecksumBenchmark {
    
      // Use a constant seed for all of the benchmarks to ensure apples to apples comparisons.
      private static final int RANDOM_SEED = new Random().nextInt();
    
      @Param({"10", "1000", "100000", "1000000"})
      private int size;
    
      private byte[] testBytes;
    
      @BeforeExperiment
      void setUp() {
        testBytes = new byte[size];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 16:53:43 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

        Set<Element> set = Sets.newHashSetWithExpectedSize(size);
        while (set.size() < size) {
          set.add(newElement());
        }
        return set;
      }
    
      private Element newElement() {
        int value = random.nextInt();
        return isUserTypeFast ? new Element(value) : new SlowElement(value);
      }
    
      static class Element implements Comparable<Element> {
        final int hash;
    
        Element(int hash) {
          this.hash = hash;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

          StringBuilder sb = new StringBuilder();
          for (int j = 0; j < charCount; j++) {
            int codePoint;
            // discard illegal surrogate "codepoints"
            do {
              codePoint = rnd.nextInt(maxCodePoint.value);
            } while (Character.isSurrogate((char) codePoint));
            sb.appendCodePoint(codePoint);
          }
          strings[i] = sb.toString();
        }
      }
    
      @Benchmark
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

          StringBuilder sb = new StringBuilder();
          for (int j = 0; j < charCount; j++) {
            int codePoint;
            // discard illegal surrogate "codepoints"
            do {
              codePoint = rnd.nextInt(maxCodePoint.value);
            } while (Character.isSurrogate((char) codePoint));
            sb.appendCodePoint(codePoint);
          }
          strings[i] = sb.toString();
        }
      }
    
      @Benchmark
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          }
          // We need to ensure that at least 4 bytes have been put into the hasher or else
          // Hasher#hash will throw an ISE.
          int intToPut = random.nextInt();
          for (Hasher hasher : sinksAndControl) {
            hasher.putInt(intToPut);
          }
          for (Sink sink : sinks) {
            HashCode unused = sink.hash();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  7. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/DefaultMavenInvoker.java

                return firstFailedProject.getGroupId() + ":" + firstFailedProject.getArtifactId();
            }
    
            return ":" + firstFailedProject.getArtifactId();
        }
    
        protected static final Pattern NEXT_LINE = Pattern.compile("\r?\n");
    
        protected static final Pattern LAST_ANSI_SEQUENCE = Pattern.compile("(\u001B\\[[;\\d]*[ -/]*[@-~])[^\u001B]*$");
    
        protected static final String ANSI_RESET = "\u001B\u005Bm";
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/HashingTest.java

            for (int i = 0; i < params1.length; i++) {
              if (method.getParameterTypes()[i] == int.class) {
                params1[i] = random.nextInt();
                params2[i] = random.nextInt();
              } else if (method.getParameterTypes()[i] == long.class) {
                params1[i] = random.nextLong();
                params2[i] = random.nextLong();
              } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 09 17:40:09 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          }
          // We need to ensure that at least 4 bytes have been put into the hasher or else
          // Hasher#hash will throw an ISE.
          int intToPut = random.nextInt();
          for (Hasher hasher : sinksAndControl) {
            hasher.putInt(intToPut);
          }
          for (Sink sink : sinks) {
            HashCode unused = sink.hash();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        for (int i = 0; i < iterations; i++) {
          List<Integer> list = Lists.newArrayList();
          for (int j = 0; j < elements; j++) {
            list.add(random.nextInt(10 * i + j + 1));
          }
    
          for (int seed = 1; seed < seeds; seed++) {
            int k = random.nextInt(10 * seed);
            assertEquals(ordering.sortedCopy(list).subList(0, k), ordering.leastOf(list, k));
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top