Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for compareInts (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. maven-core/src/test/resources/apiv4-repo/junit/junit/4.13.1/junit-4.13.1.jar

    org/junit/runners/RuleContainer$1.class package org.junit.runners; final synchronized class RuleContainer$1 implements java.util.Comparator { void RuleContainer$1(); public int compare(RuleContainer$RuleEntry, RuleContainer$RuleEntry); private int compareInt(int, int); } org/junit/runners/ParentRunner$ClassRuleCollector.class package org.junit.runners; synchronized class ParentRunner$ClassRuleCollector implements model.MemberValueConsumer { final java.util.List entries; private void ParentRunner$ClassRuleCollector();...
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Tue Dec 19 19:08:55 UTC 2023
    - 373.7K bytes
    - Viewed (0)
Back to top