Versions in this module Expand all Collapse all v0 v0.6.0 Jun 1, 2026 v0.5.0 May 30, 2026 v0.4.0 May 30, 2026 Changes in this version + var ErrCycle = errors.New("sampling: cycle detected in table references") + var ErrUnknownTable = errors.New("sampling: unknown table") + func Roll[T any](ctx context.Context, tables *Tables[T], table TableID, src predicates.Source, ...) error + type GroupID uint16 + type Item struct + Group GroupID + Max int + Min int + Predicate predicates.Predicate + Reference TableID + Value T + Weight float32 + type Result struct + Count int + Value T + type TableID uint32 + type Tables struct + func NewTables[T any]() *Tables[T] + func (t *Tables[T]) Get(id TableID) ([]Item[T], bool) + func (t *Tables[T]) Register(id TableID, items []Item[T])