Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { RandomNumberGenerator() *Rand SetRandomNumberGenerator(generator *Rand) }
Container defines an interface embedding a Model
type Rand ¶
type Rand struct {
// contains filtered or unexported fields
}
Rand is a source of project-specific random numbers
func NewTimeSeeded ¶
func NewTimeSeeded() *Rand
New returns a new Rand that uses random values seeded from a source of the system-time to generate other random values.
func (*Rand) Float64Unitary ¶
Float64Unitary returns, as a float64, a non-negative pseudo-random number in [0,1].
func (*Rand) Int63n ¶
Int63n returns, as an int64, a non-negative pseudo-random number in [0,n). It panics if n <= 0.
type RandContainer ¶
type RandContainer struct {
// contains filtered or unexported fields
}
RandContainer offers a struct implementing the Container interface.
func (*RandContainer) RandomNumberGenerator ¶
func (g *RandContainer) RandomNumberGenerator() *Rand
func (*RandContainer) SetRandomNumberGenerator ¶
func (g *RandContainer) SetRandomNumberGenerator(generator *Rand)
Click to show internal directories.
Click to hide internal directories.