Skip to content

Commit d9480d1

Browse files
torfjeldesunxd3
andauthored
Apply suggestions from code review
Co-authored-by: Xianda Sun <[email protected]>
1 parent 1bfbef1 commit d9480d1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/src/api.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,8 @@ end
133133
To implement the state, we need to keep track of a couple of things:
134134
- `index`: the index of the sampler used in this `step`.
135135
- `states`: the current states of _all_ the components.
136-
Two aspects of this might seem a bit strange:
137-
1. We need to keep track of the states of _all_ components rather than just the state for the sampler we used previously.
138-
2. We need to put the `transition` from the `step` into the state.
139-
140-
The reason for (1) is that lots of samplers keep track of more than just the previous realizations of the variables, e.g. in `AdvancedHMC.jl` we keep track of the momentum used, the metric used, etc.
136+
We need to keep track of the states of _all_ components rather than just the state for the sampler we used previously.
137+
The reason is that lots of samplers keep track of more than just the previous realizations of the variables, e.g. in `AdvancedHMC.jl` we keep track of the momentum used, the metric used, etc.
141138

142139
For (2) the reason is similar: some samplers might keep track of the variables _in the state_ differently, e.g. you might have a sampler which is _independent_ of the current realizations and the state is simply `nothing`.
143140

0 commit comments

Comments
 (0)