- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for compareInts (0.24 sec)
-
pkg/scheduler/internal/heap/heap_test.go
return testHeapObject{name: name, val: val} } func compareInts(val1 interface{}, val2 interface{}) bool { first := val1.(testHeapObject).val.(int) second := val2.(testHeapObject).val.(int) return first < second } // TestHeapBasic tests Heap invariant func TestHeapBasic(t *testing.T) { h := New(testHeapObjectKeyFunc, compareInts) const amount = 500 var i int // empty queue
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 05 02:24:38 UTC 2023 - 7.9K bytes - Viewed (0) -
test/typeparam/issue51423.dir/b.go
package b import "./a" func C() a.Comparator[int] { return a.CompareInt[int] } func main() { _ = C()(1, 2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 11 00:42:08 UTC 2022 - 114 bytes - Viewed (0) -
test/typeparam/issue51423.dir/a.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package a type Comparator[T any] func(v1, v2 T) int func CompareInt[T ~int](a, b T) int { if a < b { return -1 } if a == b { return 0 } return 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 11 00:42:08 UTC 2022 - 318 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/semver/semver.go
pw, ok2 := parse(w) if !ok1 && !ok2 { return 0 } if !ok1 { return -1 } if !ok2 { return +1 } if c := compareInt(pv.major, pw.major); c != 0 { return c } if c := compareInt(pv.minor, pw.minor); c != 0 { return c } if c := compareInt(pv.patch, pw.patch); c != 0 { return c } return comparePrerelease(pv.prerelease, pw.prerelease) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 12 20:38:21 UTC 2023 - 8.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/versions/gover.go
return "", "", false } return x[:i], x[i:], true } // cmpInt returns cmp.Compare(x, y) interpreting x and y as decimal numbers. // (Copied from golang.org/x/mod/semver's compareInt.) func cmpInt(x, y string) int { if x == y { return 0 } if len(x) < len(y) { return -1 } if len(x) > len(y) { return +1 } if x < y { return -1 } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 21:52:54 UTC 2023 - 4.2K bytes - Viewed (0) -
src/internal/gover/gover.go
return "", "", false } return x[:i], x[i:], true } // CmpInt returns cmp.Compare(x, y) interpreting x and y as decimal numbers. // (Copied from golang.org/x/mod/semver's compareInt.) func CmpInt(x, y string) int { if x == y { return 0 } if len(x) < len(y) { return -1 } if len(x) > len(y) { return +1 } if x < y { return -1 } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 06 23:20:32 UTC 2023 - 5.8K bytes - Viewed (0)