Particle sampling
SpinGEMPIC.sample!
— Methodsample!( rng, pg, df, mesh, method)
Sample from a Particle sampler
rnd
: Random generatorpg
: Particle groupdf
: Distribution functionmesh
: Domainmethod
:weighted
orquietstart
with weigth = 1
SpinGEMPIC.sample_quietstart!
— Methodsample_quietsart!( rng, pg, df, mesh)
Sample from a Particle sampler
rnd
: Random generatorpg
: Particle groupdf
: Distribution functionmesh
: Domain
Input r is a random number $\in [0,1]$
\[ f(x) = 1 + \alpha cos(k x)\]
on some domain $[0, 2\pi/k]$
Solve the equation $P(x)-r=0$ with Newton’s method
\[ x^{n+1} = x^n – (P(x)-(2\pi r / k)/f(x) \]
with
\[P(x) = \int_0^x (1 + \alpha cos(k y)) dy\]
\[P(x) = x + \frac{\alpha}{k} sin (k x)\]
SpinGEMPIC.sample_weighted!
— Methodsample_weighted!( rng, pg, df, mesh)
Sample from a Particle sampler
rnd
: Random generatorpg
: Particle groupdf
: Distribution functionmesh
: Domain