| 1 | // Code generated by 'yaegi extract math/rand'. DO NOT EDIT. |
| 2 | |
| 3 | //go:build go1.22 |
| 4 | // +build go1.22 |
| 5 | |
| 6 | package stdlib |
| 7 | |
| 8 | import ( |
| 9 | "math/rand" |
| 10 | "reflect" |
| 11 | ) |
| 12 | |
| 13 | func init() { |
| 14 | Symbols["math/rand/rand"] = map[string]reflect.Value{ |
| 15 | // function, constant and variable definitions |
| 16 | "ExpFloat64": reflect.ValueOf(rand.ExpFloat64), |
| 17 | "Float32": reflect.ValueOf(rand.Float32), |
| 18 | "Float64": reflect.ValueOf(rand.Float64), |
| 19 | "Int": reflect.ValueOf(rand.Int), |
| 20 | "Int31": reflect.ValueOf(rand.Int31), |
| 21 | "Int31n": reflect.ValueOf(rand.Int31n), |
| 22 | "Int63": reflect.ValueOf(rand.Int63), |
| 23 | "Int63n": reflect.ValueOf(rand.Int63n), |
| 24 | "Intn": reflect.ValueOf(rand.Intn), |
| 25 | "New": reflect.ValueOf(rand.New), |
| 26 | "NewSource": reflect.ValueOf(rand.NewSource), |
| 27 | "NewZipf": reflect.ValueOf(rand.NewZipf), |
| 28 | "NormFloat64": reflect.ValueOf(rand.NormFloat64), |
| 29 | "Perm": reflect.ValueOf(rand.Perm), |
| 30 | "Read": reflect.ValueOf(rand.Read), |
| 31 | "Seed": reflect.ValueOf(rand.Seed), |
| 32 | "Shuffle": reflect.ValueOf(rand.Shuffle), |
| 33 | "Uint32": reflect.ValueOf(rand.Uint32), |
| 34 | "Uint64": reflect.ValueOf(rand.Uint64), |
| 35 | |
| 36 | // type definitions |
| 37 | "Rand": reflect.ValueOf((*rand.Rand)(nil)), |
| 38 | "Source": reflect.ValueOf((*rand.Source)(nil)), |
| 39 | "Source64": reflect.ValueOf((*rand.Source64)(nil)), |
| 40 | "Zipf": reflect.ValueOf((*rand.Zipf)(nil)), |
| 41 | |
| 42 | // interface wrapper definitions |
| 43 | "_Source": reflect.ValueOf((*_math_rand_Source)(nil)), |
| 44 | "_Source64": reflect.ValueOf((*_math_rand_Source64)(nil)), |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // _math_rand_Source is an interface wrapper for Source type |
| 49 | type _math_rand_Source struct { |
| 50 | IValue interface{} |
| 51 | WInt63 func() int64 |
| 52 | WSeed func(seed int64) |
| 53 | } |
| 54 | |
| 55 | func (W _math_rand_Source) Int63() int64 { return W.WInt63() } |
| 56 | func (W _math_rand_Source) Seed(seed int64) { W.WSeed(seed) } |
| 57 | |
| 58 | // _math_rand_Source64 is an interface wrapper for Source64 type |
| 59 | type _math_rand_Source64 struct { |
| 60 | IValue interface{} |
| 61 | WInt63 func() int64 |
| 62 | WSeed func(seed int64) |
| 63 | WUint64 func() uint64 |
| 64 | } |
| 65 | |
| 66 | func (W _math_rand_Source64) Int63() int64 { return W.WInt63() } |
| 67 | func (W _math_rand_Source64) Seed(seed int64) { W.WSeed(seed) } |
| 68 | func (W _math_rand_Source64) Uint64() uint64 { return W.WUint64() } |