github.com/switchupcb/yaegi@v0.10.2/stdlib/go1_16_math_rand.go (about)

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