Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 108 for nums (0.04 sec)

  1. test/typeparam/issue51925.go

    	if x < y {
    		return x
    	}
    	return y
    }
    
    // Min returns the minimum element of `nums`.
    func Min[T IntLike, NumSlice ~[]T](nums NumSlice) T {
    	if len(nums) == 0 {
    		return T(0)
    	}
    	return Reduce(min[T], nums, nums[0])
    }
    
    // VarMin is the variadic version of Min.
    func VarMin[T IntLike](nums ...T) T {
    	return Min(nums)
    }
    
    type myInt int
    
    func main() {
    	fmt.Println(VarMin(myInt(1), myInt(2)))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 963 bytes
    - Viewed (0)
  2. docs/debugging/hash-set/main.go

    	if cardinality <= 0 {
    		// Returns an empty int slice for cardinality < 0.
    		return nil
    	}
    
    	nums := make([]int, cardinality)
    	keyCrc := crc32.Checksum([]byte(key), crc32.IEEETable)
    
    	start := int(keyCrc % uint32(cardinality))
    	for i := 1; i <= cardinality; i++ {
    		nums[i-1] = 1 + ((start + i) % cardinality)
    	}
    	return nums
    }
    
    var (
    	file, object, deploymentID, prefix string
    	setCount, shards                   int
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  3. src/internal/types/testdata/fixedbugs/issue59740.go

    type List[T any] func(T, func(T, List[T]) T) T
    
    func nil[T any](n T, _ List[T]) T        { return n }
    func cons[T any](h T, t List[T]) List[T] { return func(n T, f func(T, List[T]) T) T { return f(h, t) } }
    
    func nums[T any](t T) List[T] {
    	return cons(t, cons(t, nil /* ERROR "type func(n T, _ List[T]) T of nil[T] does not match inferred type List[T] for List[T]" */ [T]))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 12:32:24 UTC 2023
    - 800 bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Enums.java

     */
    @GwtIncompatible
    @J2ktIncompatible
    @ElementTypesAreNonnullByDefault
    public final class Enums {
    
      private Enums() {}
    
      /**
       * Returns the {@link Field} in which {@code enumValue} is defined. For example, to get the {@code
       * Description} annotation on the {@code GOLF} constant of enum {@code Sport}, use {@code
       * Enums.getField(Sport.GOLF).getAnnotation(Description.class)}.
       *
       * @since 12.0
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 26 11:56:44 UTC 2023
    - 5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Enums.java

     */
    @GwtIncompatible
    @J2ktIncompatible
    @ElementTypesAreNonnullByDefault
    public final class Enums {
    
      private Enums() {}
    
      /**
       * Returns the {@link Field} in which {@code enumValue} is defined. For example, to get the {@code
       * Description} annotation on the {@code GOLF} constant of enum {@code Sport}, use {@code
       * Enums.getField(Sport.GOLF).getAnnotation(Description.class)}.
       *
       * @since 12.0
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 26 11:56:44 UTC 2023
    - 5K bytes
    - Viewed (0)
  6. analysis/analysis-api/testData/components/containingDeclarationProvider/containingDeclarationByPsi/enums.kt

    Ilya Kirillov <******@****.***> 1665754261 +0200
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Oct 26 19:19:00 UTC 2022
    - 327 bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/EnumsTest.java

        assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).hasValue(TestEnum.POODLE);
    
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).isPresent();
        assertThat(Enums.getIfPresent(TestEnum.class, "HONDA")).isPresent();
        assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).isPresent();
    
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. pkg/kubelet/apis/config/validation/validation_reserved_memory.go

    			}
    
    			// validates that the limit has non-zero value
    			if q.IsZero() {
    				errors = append(errors, fmt.Errorf("invalid configuration: reserved memory may not be zero for NUMA node %d and resource %q", numaNode, resourceName))
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 18 13:31:31 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/topologymanager/policy_single_numa_node.go

    type singleNumaNodePolicy struct {
    	// numaInfo represents list of NUMA Nodes available on the underlying machine and distances between them
    	numaInfo *NUMAInfo
    	opts     PolicyOptions
    }
    
    var _ Policy = &singleNumaNodePolicy{}
    
    // PolicySingleNumaNode policy name.
    const PolicySingleNumaNode string = "single-numa-node"
    
    // NewSingleNumaNodePolicy returns single-numa-node policy.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 09 16:52:08 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/cpumanager/policy_options.go

    	FullPhysicalCPUsOnly bool
    	// Flag to evenly distribute CPUs across NUMA nodes in cases where more
    	// than one NUMA node is required to satisfy the allocation.
    	DistributeCPUsAcrossNUMA bool
    	// Flag to ensure CPUs are considered aligned at socket boundary rather than
    	// NUMA boundary
    	AlignBySocket bool
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 5.1K bytes
    - Viewed (0)
Back to top