- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for maxFuncs (0.13 sec)
-
src/cmd/vendor/github.com/google/pprof/internal/report/report.go
} return a.sym.Start < b.sym.Start } if maxFuncs < 0 { sort.Sort(orderSyms{syms, byName}) } else { byFlatSum := func(a, b *objSymbol) bool { suma, _ := symNodes[a].Sum() sumb, _ := symNodes[b].Sum() if suma != sumb { return suma > sumb } return byName(a, b) } sort.Sort(orderSyms{syms, byFlatSum}) if len(syms) > maxFuncs { syms = syms[:maxFuncs] } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 37.5K bytes - Viewed (0) -
src/slices/sort_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 09 19:20:55 UTC 2024 - 9.5K bytes - Viewed (0) -
src/slices/sort.go
m = max(m, x[i]) } return m } // MaxFunc returns the maximal value in x, using cmp to compare elements. // It panics if x is empty. If there is more than one maximal element // according to the cmp function, MaxFunc returns the first one. func MaxFunc[S ~[]E, E any](x S, cmp func(a, b E) int) E { if len(x) < 1 { panic("slices.MaxFunc: empty list") } m := x[0] for i := 1; i < len(x); i++ {
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/slices/example_test.go
func ExampleMaxFunc() { type Person struct { Name string Age int } people := []Person{ {"Gopher", 13}, {"Alice", 55}, {"Vera", 24}, {"Bob", 55}, } firstOldest := slices.MaxFunc(people, func(a, b Person) int { return cmp.Compare(a.Age, b.Age) }) fmt.Println(firstOldest.Name) // Output: // Alice } func ExampleMin() { numbers := []int{0, 42, -10, 8}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/regexp/syntax/parse.go
// 128 MB is enough for a 3.3 million Inst structures, which roughly // corresponds to a 3.3 MB regexp. const ( maxSize = 128 << 20 / instSize instSize = 5 * 8 // byte, 2 uint32, slice is 5 64-bit words ) // maxRunes is the maximum number of runes allowed in a regexp tree // counting the runes in all the nodes. // Ignoring character classes p.numRunes is always less than the length of the regexp.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 13:59:01 UTC 2024 - 52.1K bytes - Viewed (0) -
api/go1.21.txt
pkg slices, func IsSortedFunc[$0 interface{ ~[]$1 }, $1 interface{}]($0, func($1, $1) int) bool #60091 pkg slices, func Max[$0 interface{ ~[]$1 }, $1 cmp.Ordered]($0) $1 #60091 pkg slices, func MaxFunc[$0 interface{ ~[]$1 }, $1 interface{}]($0, func($1, $1) int) $1 #60091 pkg slices, func Min[$0 interface{ ~[]$1 }, $1 cmp.Ordered]($0) $1 #60091
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 09:39:17 UTC 2023 - 25.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Grow", Func, 21}, {"Index", Func, 21}, {"IndexFunc", Func, 21}, {"Insert", Func, 21}, {"IsSorted", Func, 21}, {"IsSortedFunc", Func, 21}, {"Max", Func, 21}, {"MaxFunc", Func, 21}, {"Min", Func, 21}, {"MinFunc", Func, 21}, {"Replace", Func, 21}, {"Reverse", Func, 21}, {"Sort", Func, 21}, {"SortFunc", Func, 21}, {"SortStableFunc", Func, 21}, },
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)