Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for binarySearch (0.22 sec)

  1. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

          fromIndex =
              SortedLists.binarySearch(
                  ranges,
                  Range::upperBound,
                  range.lowerBound,
                  KeyPresentBehavior.FIRST_AFTER,
                  KeyAbsentBehavior.NEXT_HIGHER);
        } else {
          fromIndex = 0;
        }
    
        int toIndex;
        if (range.hasUpperBound()) {
          toIndex =
              SortedLists.binarySearch(
                  ranges,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/OrderingTest.java

          for (int i = 0; i < strictlyOrderedList.size(); i++) {
            assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i)));
          }
          List<T> newList = Lists.newArrayList(strictlyOrderedList);
          T valueNotInList = newList.remove(1);
          assertEquals(-2, ordering.binarySearch(newList, valueNotInList));
        }
    
        void testSortedCopy() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/OrderingTest.java

          for (int i = 0; i < strictlyOrderedList.size(); i++) {
            assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i)));
          }
          List<T> newList = Lists.newArrayList(strictlyOrderedList);
          T valueNotInList = newList.remove(1);
          assertEquals(-2, ordering.binarySearch(newList, valueNotInList));
        }
    
        void testSortedCopy() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/tests/NamingTest.java

            ByteBuffer buf = ByteBuffer.allocate(128);
            Arrays.sort(excludes);
            for ( int i = 128; i < 255; i++ ) {
                int idx = Arrays.binarySearch(excludes, i);
                if ( idx < 0 || excludes[ idx ] == i ) {
                    continue;
                }
    
                if ( i == 240 ) {
                    continue;
                }
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sat Jun 06 10:48:05 GMT 2020
    - 7K bytes
    - Viewed (0)
  5. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

      /**
       * Returns true if the [codePoint] was applied successfully. Returns false if it was disallowed.
       */
      fun map(
        codePoint: Int,
        sink: BufferedSink,
      ): Boolean {
        val index =
          mappings.binarySearch {
            when {
              it.sourceCodePoint1 < codePoint -> -1
              it.sourceCodePoint0 > codePoint -> 1
              else -> 0
            }
          }
    
        // Code points must be in 0..0x10ffff.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Ordering.java

        return true;
      }
    
      /**
       * {@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for
       * {@code key} using the binary search algorithm. The list must be sorted using this ordering.
       *
       * @param sortedList the list to be searched
       * @param key the key to be searched for
       * @deprecated Use {@link Collections#binarySearch(List, Object, Comparator)} directly.
       */
      @Deprecated
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  7. maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java

                                + defaultLifecycles.getLifecyclePhaseList() + ".",
                        lifecyclePhase);
            }
    
            LifecycleMappingDelegate delegate;
            if (Arrays.binarySearch(DefaultLifecycles.STANDARD_LIFECYCLES, lifecycle.getId()) >= 0) {
                delegate = standardDelegate;
            } else {
                delegate = delegates.get(lifecycle.getId());
                if (delegate == null) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Jan 10 12:55:54 GMT 2024
    - 26.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/tests/EnumTest.java

                    }
    
                    String[] found = f.list();
                    Arrays.sort(found);
    
                    for ( int i = 0; i < n; i++ ) {
                        Assert.assertTrue(Arrays.binarySearch(found, String.format("%s%d.tmp", prefix, i)) >= 0);
                    }
                }
                finally {
                    f.delete();
                }
            }
    
        }
    
    
        @Test
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Thu Jan 05 13:09:03 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/CharMatcher.java

              checkArgument(rangeEnds[i] < rangeStarts[i + 1]);
            }
          }
        }
    
        @Override
        public boolean matches(char c) {
          int index = Arrays.binarySearch(rangeStarts, c);
          if (index >= 0) {
            return true;
          } else {
            index = ~index - 1;
            return index >= 0 && c <= rangeEnds[index];
          }
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 53.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

                Arrays.copyOf(sortedElements, IntMath.saturatedAdd(length, length / 2 + 1));
          }
          int[] sortedCounts = new int[sortedElements.length];
          for (int i = 0; i < length; i++) {
            int index = Arrays.binarySearch(sortedElements, 0, uniques, elements[i], comparator);
            if (counts[i] >= 0) {
              sortedCounts[index] += counts[i];
            } else {
              sortedCounts[index] = ~counts[i];
            }
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
Back to top