Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for intSlice (0.16 sec)

  1. src/sort/sort_impl_120.go

    // license that can be found in the LICENSE file.
    
    //go:build !go1.21
    
    package sort
    
    func intsImpl(x []int)         { Sort(IntSlice(x)) }
    func float64sImpl(x []float64) { Sort(Float64Slice(x)) }
    func stringsImpl(x []string)   { Sort(StringSlice(x)) }
    
    func intsAreSortedImpl(x []int) bool         { return IsSorted(IntSlice(x)) }
    func float64sAreSortedImpl(x []float64) bool { return IsSorted(Float64Slice(x)) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 13:00:18 UTC 2023
    - 602 bytes
    - Viewed (0)
  2. staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceSlice.yaml

        name: nameValue
        uid: uidValue
      resourceVersion: resourceVersionValue
      selfLink: selfLinkValue
      uid: uidValue
    namedResources:
      instances:
      - attributes:
        - bool: true
          int: 7
          intSlice:
            ints:
            - 1
          name: nameValue
          quantity: "0"
          string: stringValue
          stringSlice:
            strings:
            - stringsValue
          version: versionValue
        name: nameValue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. src/sort/search_test.go

    	name   string
    	result int
    	i      int
    }{
    	{"SearchInts", SearchInts(data, 11), 8},
    	{"SearchFloat64s", SearchFloat64s(fdata, 2.1), 4},
    	{"SearchStrings", SearchStrings(sdata, ""), 0},
    	{"IntSlice.Search", IntSlice(data).Search(0), 2},
    	{"Float64Slice.Search", Float64Slice(fdata).Search(2.0), 3},
    	{"StringSlice.Search", StringSlice(sdata).Search("x"), 3},
    }
    
    func TestSearchWrappers(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 07 14:42:13 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceSlice.yaml

        name: nameValue
        uid: uidValue
      resourceVersion: resourceVersionValue
      selfLink: selfLinkValue
      uid: uidValue
    namedResources:
      instances:
      - attributes:
        - bool: true
          int: 7
          intSlice:
            ints:
            - 1
          name: nameValue
          quantity: "0"
          string: stringValue
          stringSlice:
            strings:
            - stringsValue
          version: versionValue
        name: nameValue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:52:25 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceSlice.json

          {
            "name": "nameValue",
            "attributes": [
              {
                "name": "nameValue",
                "quantity": "0",
                "bool": true,
                "int": 7,
                "intSlice": {
                  "ints": [
                    1
                  ]
                },
                "string": "stringValue",
                "stringSlice": {
                  "strings": [
                    "stringsValue"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceSlice.json

          {
            "name": "nameValue",
            "attributes": [
              {
                "name": "nameValue",
                "quantity": "0",
                "bool": true,
                "int": 7,
                "intSlice": {
                  "ints": [
                    1
                  ]
                },
                "string": "stringValue",
                "stringSlice": {
                  "strings": [
                    "stringsValue"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:52:25 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. src/sort/sort_slices_benchmark_test.go

    	}
    	Strings(x)
    	return x
    }
    
    const N = 100_000
    
    func BenchmarkSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		Sort(IntSlice(ints))
    	}
    }
    
    func BenchmarkSlicesSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		slices.Sort(ints)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/api/resource/v1alpha2/namedresources.go

    	// IntValue is a 64-bit integer.
    	IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"`
    	// IntSliceValue is an array of 64-bit integers.
    	IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"`
    	// StringValue is a string.
    	StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"`
    	// StringSliceValue is an array of strings.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 12:18:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/test/issue50182_test.go

    	n := data.Len()
    	for i := n - 1; i > 0; i-- {
    		if data.Less(i, i-1) {
    			return false
    		}
    	}
    	return true
    }
    func TestGenericSorted(t *testing.T) {
    	var data = sort.IntSlice{-10, -5, 0, 1, 2, 3, 5, 7, 11, 100, 100, 100, 1000, 10000}
    	f := func() {
    		genericSorted(data)
    	}
    	if n := testing.AllocsPerRun(10, f); n > 0 {
    		t.Errorf("got %f allocs, want 0", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 23:35:37 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  10. src/internal/types/testdata/examples/functions.go

    // so type inference should be able to handle these cases well.
    
    func g1[T any]([]T) {}
    func g2[T any]([]T, T) {}
    func g3[T any](*T, ...T) {}
    
    func _() {
    	type intSlice []int
    	g1([]int{})
    	g1(intSlice{})
    	g2(nil, 0)
    
    	type myString string
    	var s1 string
    	g3(nil, "1", myString("2"), "3")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 30 20:19:38 UTC 2023
    - 5.5K bytes
    - Viewed (0)
Back to top