swh:1:snp:d80eec3f654c152adbdd6e641362bcb340d39fe2
Raw File
Tip revision: 821ef9070bbc1159be78bcb71189e300451bec82 authored by Daniel Lee on 25 November 2016, 16:39:14 UTC
Merge pull request #2133 from stan-dev/release/v2.13.0
Tip revision: 821ef90
stepsize_covar_adapter.hpp
#ifndef STAN_MCMC_STEPSIZE_COVAR_ADAPTER_HPP
#define STAN_MCMC_STEPSIZE_COVAR_ADAPTER_HPP

#include <stan/interface_callbacks/writer/base_writer.hpp>
#include <stan/mcmc/base_adapter.hpp>
#include <stan/mcmc/stepsize_adaptation.hpp>
#include <stan/mcmc/covar_adaptation.hpp>

namespace stan {

  namespace mcmc {

    class stepsize_covar_adapter: public base_adapter {
    public:
      explicit stepsize_covar_adapter(int n)
        : covar_adaptation_(n) {
      }

      stepsize_adaptation& get_stepsize_adaptation() {
        return stepsize_adaptation_;
      }

      covar_adaptation& get_covar_adaptation() {
        return covar_adaptation_;
      }

      void set_window_params(unsigned int num_warmup,
                             unsigned int init_buffer,
                             unsigned int term_buffer,
                             unsigned int base_window,
                             interface_callbacks::writer::base_writer& writer) {
        covar_adaptation_.set_window_params(num_warmup,
                                            init_buffer,
                                            term_buffer,
                                            base_window,
                                            writer);
      }

    protected:
      stepsize_adaptation stepsize_adaptation_;
      covar_adaptation covar_adaptation_;
    };

  }  // mcmc

}  // stan

#endif
back to top