Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFailedAssignmentWeightedChoice returns if there is some // inability to select a variant at the set weight // when the defaults are returned from Assign ErrFailedAssignmentWeightedChoice = errors.New("failed to assign weighted choice") // ErrNoVariants Returns when an experiment has no variants ErrNoVariants = errors.New("no variants") )
Functions ¶
This section is empty.
Types ¶
type Probabilistic ¶
Probabilistic implements a probabilistic selector of variants
func NewProbabilistic ¶
func NewProbabilistic(variants []*variant.Variant) *Probabilistic
NewProbabilistic returns an initialized Sample operator
type Sample ¶
Sample implements a sampler for
type UniformChoice ¶
UniformChoice implements an assignment operator for uniform choice selection of variants
func NewUniformChoice ¶
func NewUniformChoice(v []*variant.Variant) *UniformChoice
NewUniformChoice returns an initilized weighted choice assignment operator
type WeightedChoice ¶
WeightedChoice implements an assignment operator for weighted choice selection of variants
func NewWeightedChoice ¶
func NewWeightedChoice(v []*variant.Variant) *WeightedChoice
NewWeightedChoice returns an initilized weighted choice assignment operator
Click to show internal directories.
Click to hide internal directories.