From d9480d1616daa965c51bfb4eb96b0030b37779fa Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Thu, 10 Oct 2024 09:29:18 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Xianda Sun <5433119+sunxd3@users.noreply.github.com> --- docs/src/api.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index d8b8a4f..f4d5293 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -133,11 +133,8 @@ end To implement the state, we need to keep track of a couple of things: - `index`: the index of the sampler used in this `step`. - `states`: the current states of _all_ the components. -Two aspects of this might seem a bit strange: -1. We need to keep track of the states of _all_ components rather than just the state for the sampler we used previously. -2. We need to put the `transition` from the `step` into the state. - -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. +We need to keep track of the states of _all_ components rather than just the state for the sampler we used previously. +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. 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`.