File: go1_22_math_rand_v2.go

package info (click to toggle)
golang-github-traefik-yaegi 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,608 kB
  • sloc: sh: 457; makefile: 39
file content (58 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Code generated by 'yaegi extract math/rand/v2'. DO NOT EDIT.

//go:build go1.22
// +build go1.22

package stdlib

import (
	"math/rand/v2"
	"reflect"
)

func init() {
	Symbols["math/rand/v2/rand"] = map[string]reflect.Value{
		// function, constant and variable definitions
		"ExpFloat64":  reflect.ValueOf(rand.ExpFloat64),
		"Float32":     reflect.ValueOf(rand.Float32),
		"Float64":     reflect.ValueOf(rand.Float64),
		"Int":         reflect.ValueOf(rand.Int),
		"Int32":       reflect.ValueOf(rand.Int32),
		"Int32N":      reflect.ValueOf(rand.Int32N),
		"Int64":       reflect.ValueOf(rand.Int64),
		"Int64N":      reflect.ValueOf(rand.Int64N),
		"IntN":        reflect.ValueOf(rand.IntN),
		"New":         reflect.ValueOf(rand.New),
		"NewChaCha8":  reflect.ValueOf(rand.NewChaCha8),
		"NewPCG":      reflect.ValueOf(rand.NewPCG),
		"NewZipf":     reflect.ValueOf(rand.NewZipf),
		"NormFloat64": reflect.ValueOf(rand.NormFloat64),
		"Perm":        reflect.ValueOf(rand.Perm),
		"Shuffle":     reflect.ValueOf(rand.Shuffle),
		"Uint32":      reflect.ValueOf(rand.Uint32),
		"Uint32N":     reflect.ValueOf(rand.Uint32N),
		"Uint64":      reflect.ValueOf(rand.Uint64),
		"Uint64N":     reflect.ValueOf(rand.Uint64N),
		"UintN":       reflect.ValueOf(rand.UintN),

		// type definitions
		"ChaCha8": reflect.ValueOf((*rand.ChaCha8)(nil)),
		"PCG":     reflect.ValueOf((*rand.PCG)(nil)),
		"Rand":    reflect.ValueOf((*rand.Rand)(nil)),
		"Source":  reflect.ValueOf((*rand.Source)(nil)),
		"Zipf":    reflect.ValueOf((*rand.Zipf)(nil)),

		// interface wrapper definitions
		"_Source": reflect.ValueOf((*_math_rand_v2_Source)(nil)),
	}
}

// _math_rand_v2_Source is an interface wrapper for Source type
type _math_rand_v2_Source struct {
	IValue  interface{}
	WUint64 func() uint64
}

func (W _math_rand_v2_Source) Uint64() uint64 {
	return W.WUint64()
}