Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 1,100 for ndarray (0.05 sec)

  1. src/main/java/org/codelibs/core/collection/ArrayMap.java

         */
        public V[] toArray(final V[] proto) {
            @SuppressWarnings("unchecked")
            final V[] array = proto.length >= size ? proto : (V[]) Array.newInstance(proto.getClass().getComponentType(), size);
            for (int i = 0; i < array.length; i++) {
                array[i] = getAt(i);
            }
            if (array.length > size) {
                array[size] = null;
            }
            return array;
        }
    
        @Override
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ImmutableListTest.java

      }
    
      public void testCreation_arrayOfArray() {
        String[] array = new String[] {"a"};
        List<String[]> list = ImmutableList.<String[]>of(array);
        assertEquals(singletonList(array), list);
      }
    
      public void testCopyOf_emptyArray() {
        String[] array = new String[0];
        List<String> list = ImmutableList.copyOf(array);
        assertEquals(emptyList(), list);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java

          chars.add(randomAlpha());
        }
        for (int i = 0; i < nonAlpha; i++) {
          chars.add(randomNonAlpha());
        }
        Collections.shuffle(chars, random);
        char[] array = Chars.toArray(chars);
        this.testString = new String(array);
      }
    
      private char randomAlpha() {
        return ALPHA.charAt(random.nextInt(ALPHA.length()));
      }
    
      private char randomNonAlpha() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.8K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

      }
    
      static <T> T[] newArray(T[] reference, int length) {
        T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0);
        return Arrays.copyOf(empty, length);
      }
    
      /** Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()). */
      static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
        T[] result = newArray(arrayOfType, to - from);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

      public void testVerifyMegaStreamHalves() {
        assertThat(
                concat(megaPrimitiveDoubleStreamPart1(), megaPrimitiveDoubleStreamPart2())
                    .sorted()
                    .toArray())
            .isEqualTo(megaPrimitiveDoubleStream().toArray());
      }
    
      public void testAddAllPrimitiveDoubleStream() {
        StatsAccumulator accumulator = new StatsAccumulator();
        accumulator.addAll(megaPrimitiveDoubleStreamPart1());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Collections2.java

        @Override
        public @Nullable Object[] toArray() {
          // creating an ArrayList so filtering happens once
          return Lists.newArrayList(iterator()).toArray();
        }
    
        @Override
        @SuppressWarnings("nullness") // b/192354773 in our checker affects toArray declarations
        public <T extends @Nullable Object> T[] toArray(T[] array) {
          return Lists.newArrayList(iterator()).toArray(array);
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/PreconditionsTest.java

        for (ImmutableList<Class<?>> sig : allSignatures(boolean.class)) {
          Method checkArgumentMethod =
              Preconditions.class.getMethod("checkArgument", sig.toArray(new Class<?>[] {}));
          checkArgumentMethod.invoke(null /* static method */, getParametersForSignature(true, sig));
    
          Object[] failingParams = getParametersForSignature(false, sig);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

      }
    
      public void testCopyOf_emptyArray() {
        String[] array = new String[0];
        Set<String> set = copyOf(array);
        assertEquals(Collections.<String>emptySet(), set);
        assertSame(this.<String>of(), set);
      }
    
      public void testCopyOf_arrayOfOneElement() {
        String[] array = new String[] {"a"};
        Set<String> set = copyOf(array);
        assertEquals(singleton("a"), set);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
          Object array = Array.newInstance(componentType.getRawType(), 1);
          Array.set(array, 0, generate(componentType));
          return array;
        }
        Method emptyGenerate = EMPTY_GENERATORS.get(rawType);
        if (emptyGenerate != null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/CompactLinkedHashSet.java

      }
    
      @Override
      public @Nullable Object[] toArray() {
        return ObjectArrays.toArrayImpl(this);
      }
    
      @Override
      @SuppressWarnings("nullness") // b/192354773 in our checker affects toArray declarations
      public <T extends @Nullable Object> T[] toArray(T[] a) {
        return ObjectArrays.toArrayImpl(this, a);
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 09 00:15:47 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top