- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 4,735 for Sort (0.04 sec)
-
src/slices/sort.go
// license that can be found in the LICENSE file. //go:generate go run $GOROOT/src/sort/gen_sort_variants.go -generic package slices import ( "cmp" "math/bits" ) // Sort sorts a slice of any ordered type in ascending order. // When sorting floating-point numbers, NaNs are ordered before other values. func Sort[S ~[]E, E cmp.Ordered](x S) { n := len(x) pdqsortOrdered(x, 0, n, bits.Len(uint(n))) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 07 23:54:41 UTC 2024 - 5.8K bytes - Viewed (0) -
src/go/parser/testdata/sort.go2
package sort type orderedSlice[Elem comparable] []Elem func (s orderedSlice[Elem]) Len() int { return len(s) } func (s orderedSlice[Elem]) Less(i, j int) bool { return s[i] < s[j] } func (s orderedSlice[Elem]) Swap(i, j int) { s[i], s[j] = s[j], s[i] } // OrderedSlice sorts the slice s in ascending order. // The elements of s must be ordered using the < operator. func OrderedSlice[Elem comparable](s []Elem) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 24 19:44:06 UTC 2020 - 902 bytes - Viewed (0) -
src/sort/sort.go
func (x StringSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } // Sort is a convenience method: x.Sort() calls Sort(x). func (x StringSlice) Sort() { Sort(x) } // Convenience wrappers for common cases // Ints sorts a slice of ints in increasing order. // // Note: as of Go 1.22, this function simply calls [slices.Sort]. func Ints(x []int) { intsImpl(x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 16:40:32 UTC 2023 - 10.1K bytes - Viewed (0) -
src/internal/fmtsort/sort.go
// Each KeyValue pair contains a map key and its corresponding value. type SortedMap []KeyValue // KeyValue holds a single key and value pair found in a map. type KeyValue struct { Key, Value reflect.Value } // Sort accepts a map and returns a SortedMap that has the same keys and // values but in a stable sorted order according to the keys, modulo issues // raised by unorderable key values such as NaNs. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:31:45 UTC 2024 - 4.9K bytes - Viewed (0) -
src/cmd/compile/internal/types/sort.go
Matthew Dempsky <******@****.***> 1622083951 -0700
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 27 22:13:38 UTC 2021 - 765 bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/tests/partitioned-topological-sort.mlir
// RUN: tf-opt %s -tfl-partitioned-topological-sort | FileCheck %s // CHECK-LABEL: @tf_ops_will_be_partitioned func.func @tf_ops_will_be_partitioned() -> tensor<1xf32> { %const = "tfl.pseudo_const"() {value = dense<[1.0]> : tensor<1xf32>} : () -> tensor<1xf32> %tmp1 = "tfl.add"(%const, %const) { fused_activation_function = "NONE" } : (tensor<1xf32>,tensor<1xf32>) -> (tensor<1xf32>)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Aug 19 22:33:49 UTC 2022 - 8.1K bytes - Viewed (0) -
releasenotes/notes/json-log-sort.yaml
John Howard <******@****.***> 1706030446 -0800
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jan 23 17:20:46 UTC 2024 - 148 bytes - Viewed (0) -
releasenotes/notes/istioctl-sort-events-by-creation.yaml
apiVersion: release-notes/v2 kind: feature area: istioctl releaseNotes: - |
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Dec 05 18:47:53 UTC 2023 - 155 bytes - Viewed (0) -
pkg/api/v1/endpoints/util.go
// use it returns the input slice. func SortSubsets(subsets []v1.EndpointSubset) []v1.EndpointSubset { for i := range subsets { ss := &subsets[i] sort.Sort(addrsByIPAndUID(ss.Addresses)) sort.Sort(addrsByIPAndUID(ss.NotReadyAddresses)) sort.Sort(portsByHash(ss.Ports)) } sort.Sort(subsetsByHash(subsets)) return subsets } func hashObject(hasher hash.Hash, obj interface{}) []byte { hashutil.DeepHashObject(hasher, obj)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 07 07:01:25 UTC 2018 - 8K bytes - Viewed (0) -
src/sort/example_test.go
fmt.Println(sort.Float64sAreSorted(s)) s = []float64{5.2, 3.8, 2.6, 1.3, 0.7} // sorted descending fmt.Println(sort.Float64sAreSorted(s)) s = []float64{5.2, 1.3, 0.7, 3.8, 2.6} // unsorted fmt.Println(sort.Float64sAreSorted(s)) // Output: true // false // false } func ExampleReverse() { s := []int{5, 2, 6, 3, 1, 4} // unsorted sort.Sort(sort.Reverse(sort.IntSlice(s))) fmt.Println(s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:29 UTC 2017 - 2.8K bytes - Viewed (0)