Documentation ¶
Overview ¶
Package intrange provides distributions that return ints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Infinite ¶
type Infinite struct{}
Infinite is a immutable range which always polls math.MaxInt32
func (Infinite) EnforceRange ¶
EnforceRange for an Infinite returns Infinite
func (Infinite) Percentile ¶
Percentile can only return math.MaxInt32
type Range ¶
type Range interface { Poll() int Mult(float64) Range EnforceRange(int) int Percentile(float64) int }
Range represents a range of integer numbers
func NewConstant ¶
NewConstant returns a range which will always return the input constant
func NewInfinite ¶
func NewInfinite() Range
NewInfinite returns a range which will always return math.MaxInt32 and is unchangeable.
Click to show internal directories.
Click to hide internal directories.