Versions in this module Expand all Collapse all v0 v0.9.2 May 11, 2021 Changes in this version + var ErrRejection = errors.New("rejection: acceptance ratio above 1") + func WithoutReplacement(idxs []int, n int, src rand.Source) + type IIDer struct + Dist distuv.Rander + func (iid IIDer) Sample(batch []float64) + type Importance struct + Proposal distuv.RandLogProber + Target distuv.LogProber + func (l Importance) SampleWeighted(batch, weights []float64) + type LatinHypercube struct + Q distuv.Quantiler + Src rand.Source + func (l LatinHypercube) Sample(batch []float64) + type MHProposal interface + ConditionalLogProb func(x, y float64) (prob float64) + ConditionalRand func(y float64) (x float64) + type MetropolisHastings struct + BurnIn int + Initial float64 + Proposal MHProposal + Rate int + Src rand.Source + Target distuv.LogProber + func (m MetropolisHastings) Sample(batch []float64) + type Rejection struct + C float64 + Proposal distuv.RandLogProber + Src rand.Source + Target distuv.LogProber + func (r *Rejection) Err() error + func (r *Rejection) Proposed() int + func (r *Rejection) Sample(batch []float64) + type SampleUniformWeighted struct + func (w SampleUniformWeighted) SampleWeighted(batch, weights []float64) + type Sampler interface + Sample func(batch []float64) + type Weighted struct + func NewWeighted(w []float64, src rand.Source) Weighted + func (s Weighted) Len() int + func (s Weighted) Reweight(idx int, w float64) + func (s Weighted) ReweightAll(w []float64) + func (s Weighted) Take() (idx int, ok bool) + type WeightedSampler interface + SampleWeighted func(batch, weights []float64)