- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for encodePerm (0.16 sec)
-
src/math/rand/rand_test.go
r.Shuffle(n, func(i, j int) { t.Fatalf("swap called, n=%d i=%d j=%d", n, i, j) }) } } // encodePerm converts from a permuted slice of length n, such as Perm generates, to an int in [0, n!). // See https://en.wikipedia.org/wiki/Lehmer_code. // encodePerm modifies the input slice. func encodePerm(s []int) int { // Convert to Lehmer code. for i, x := range s { r := s[i+1:] for j, y := range r {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
r.Shuffle(n, func(i, j int) { t.Fatalf("swap called, n=%d i=%d j=%d", n, i, j) }) } } // encodePerm converts from a permuted slice of length n, such as Perm generates, to an int in [0, n!). // See https://en.wikipedia.org/wiki/Lehmer_code. // encodePerm modifies the input slice. func encodePerm(s []int) int { // Convert to Lehmer code. for i, x := range s { r := s[i+1:] for j, y := range r {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0) -
src/encoding/gob/encoder_test.go
// See Issue 16204. func TestCatchInvalidNilValue(t *testing.T) { encodeErr, panicErr := encodeAndRecover(nil) if panicErr != nil { t.Fatalf("panicErr=%v, should not panic encoding untyped nil", panicErr) } if encodeErr == nil { t.Errorf("got err=nil, want non-nil error when encoding untyped nil value") } else if !strings.Contains(encodeErr.Error(), "nil value") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0)