Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distribution ¶
type Distribution struct {
Threshes []float64
}
func NewDistribution ¶
func NewDistribution(weights []float64) *Distribution
func (*Distribution) Generate ¶
func (d *Distribution) Generate(points int) []int
func (*Distribution) Next ¶
func (d *Distribution) Next() int
func (*Distribution) SortedIndices ¶
func (d *Distribution) SortedIndices() []int
Lowest weights come first.
func (*Distribution) Validate ¶
func (d *Distribution) Validate() error
func (*Distribution) Weights ¶
func (d *Distribution) Weights() []float64
Click to show internal directories.
Click to hide internal directories.