Algorithm 2.
Require: Functions: F = (f1,…, fn), propensities: c, number of |
iterations: NumIter, noise: g. Ensure: Estimated stationary distribution π π = EstimateStaDist(F, c, NumIter, g) |
2: return π |
function EstimateStaDist(F, c, NumIter, g) |
4: distribution ← initialize frequency vector. |
s ← initialize random initial state. |
6: for i=1,…, NumIter do |
if rand < g then |
8: y = random state between 1 and pn. |
else |
10: y = SDDS.nextstate(s, c) |
distribution(y) = +1 increase state frequency. |
12: sum = total frequencies.
π = distribution/sum |
14: return π |