Skip to content

Commit 86a7826

Browse files
committed
added docs
1 parent 28bdf91 commit 86a7826

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/src/api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,16 @@ For chains of this type, AbstractMCMC defines the following two methods.
7676
AbstractMCMC.chainscat
7777
AbstractMCMC.chainsstack
7878
```
79+
80+
## Interacting with states of samplers
81+
82+
To make it a bit easier to interact with some arbitrary sampler state, we encourage implementations of `AbstractSampler` to implement the following methods:
83+
```@docs
84+
AbstractMCMC.parameters(state, parameters)
85+
AbstractMCMC.setparameters!!(state, parameters)
86+
```
87+
and optionally
88+
```@docs
89+
AbstractMCMC.updatestate!!(state, transition, state_prev)
90+
```
91+
These methods can also be useful for implementing samplers which wraps some inner samplers, e.g. a mixture of samplers.

0 commit comments

Comments
 (0)