sampler
Package sampler
import "github.com/luxfi/node/utils/sampler"Types
Source
Uniform
Uniform samples values without replacement in the provided range
func NewBestUniform(expectedSampleSize int) Uniformfunc NewDeterministicUniform(source Source) Uniformfunc NewUniform() UniformWeighted
Weighted defines how to sample a specified valued based on a provided weighted distribution
func NewWeighted() WeightedWeightedWithoutReplacement
WeightedWithoutReplacement defines how to sample weight without replacement. Note that the behavior is to sample the weight without replacement, not the indices. So duplicate indices can be returned.
func NewDeterministicWeightedWithoutReplacement(source Source) WeightedWithoutReplacementfunc NewWeightedWithoutReplacement() WeightedWithoutReplacement