Documentation
¶
Index ¶
- func Decompf32(val float32) (base, frac int32)
- func Decompf64(val float64) (base, frac int64)
- func FileExists(filename string) bool
- func Makef32(base, frac int32) float32
- func Makef64(base, frac int64) float64
- func Maxi(x, y int) int
- func Maxi32(x, y int32) int32
- func Maxi64(x, y int64) int64
- func Maxu(x, y uint) uint
- func Maxu32(x, y uint32) uint32
- func Maxu64(x, y uint64) uint64
- func Mini(x, y int) int
- func Mini32(x, y int32) int32
- func Mini64(x, y int64) int64
- func Minu(x, y uint) uint
- func Minu32(x, y uint32) uint32
- func Minu64(x, y uint64) uint64
- func Rotli(value int, count uint) int
- func Rotli32(value int32, count uint32) int32
- func Rotli64(value int64, count uint32) int64
- func Rotlu(value uint, count uint) uint
- func Rotlu32(value uint32, count uint32) uint32
- func Rotlu64(value uint64, count uint32) uint64
- func Rotri(value int, count uint) int
- func Rotri32(value int32, count uint32) int32
- func Rotri64(value int64, count uint32) int64
- func Rotru(value uint, count uint) uint
- func Rotru32(value uint32, count uint32) uint32
- func Rotru64(value uint64, count uint32) uint64
- type IRandomGenerator
- type RandRersResrResdra
- type Random
- func (rnd Random) Next() uint64
- func (rnd Random) Nextf32() float32
- func (rnd Random) Nextf32n(minVal float32, maxVal float32) float32
- func (rnd Random) Nextf64() float64
- func (rnd Random) Nextf64n(minVal float64, maxVal float64) float64
- func (rnd Random) Nexti16() int16
- func (rnd Random) Nexti16n(minVal int16, maxVal int16) int16
- func (rnd Random) Nexti32() int32
- func (rnd Random) Nexti32n(minVal int32, maxVal int32) int32
- func (rnd Random) Nexti64() int64
- func (rnd Random) Nexti64n(minVal int64, maxVal int64) int64
- func (rnd Random) Nextu16() uint16
- func (rnd Random) Nextu16n(minVal uint16, maxVal uint16) uint16
- func (rnd Random) Nextu32() uint32
- func (rnd Random) Nextu32n(minVal uint32, maxVal uint32) uint32
- func (rnd Random) Nextu64() uint64
- func (rnd Random) Nextu64n(minVal uint64, maxVal uint64) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompf32 ¶
Decompf32 - Decompose a float32 value int two numbers. Given the following:
3.141592
The return values will be:
base = 3 frac = 141592
func Decompf64 ¶
Decompf64 - Decompose a float64 value int two numbers. Given the following:
3.141592
The return values will be:
base = 3 frac = 141592
func FileExists ¶
FileExists - checks if a file exists and is not a directory before we try using it to prevent further errors.
func Makef32 ¶
Makef32 - Make a float32 variable from two numbers. Given the following:
base = 3 frac = 141592
The return float64 value will be:
3.14159
Types ¶
type IRandomGenerator ¶
type IRandomGenerator interface {
Next() uint64
}
IRandomGenerator - random number generator interface
type RandRersResrResdra ¶
type RandRersResrResdra struct {
// contains filtered or unexported fields
}
RandRersResrResdra - Use the RERS, RESR, and RESDRA generators
func (RandRersResrResdra) Next ¶
func (rnd RandRersResrResdra) Next() uint64
Next - Generate random numbers with a very high random repeat period. Based on the article "Fast, High-Quality, Parallel Random Number Generators" by Mark A. Overton, published in Dr. Dobb's Journal on 24 May, 2011. http://drdobbs.com/go-parallel/article/229625477
type Random ¶
type Random struct {
// contains filtered or unexported fields
}
Random - Generate random numbers using the given random number generator.
func MakeRandom ¶
func MakeRandom(rg IRandomGenerator) Random
MakeRandom - Instantiate a random number producer, given the random number generator.