File crhmc_walk.hpp

struct CRHMCWalk
template<typename NT, typename OracleFunctor>
struct parameters

Public Types

using Opts = opts<NT>

Public Functions

inline parameters(OracleFunctor const &F, unsigned int dim, Opts &user_options, NT epsilon_ = 2)

Public Members

NT epsilon
NT eta = 0.2
NT momentum
NT effectiveStepSize = 1
Opts &options
template<typename Point, typename Polytope, typename RandomNumberGenerator, typename NegativeGradientFunctor, typename NegativeLogprobFunctor, typename Solver>
struct Walk

Public Types

using point = Point
using pts = std::vector<Point>
using NT = typename Point::FT
using VT = Eigen::Matrix<NT, Eigen::Dynamic, 1>
using MT = Eigen::Matrix<NT, Eigen::Dynamic, Eigen::Dynamic>
using Sampler = CRHMCWalk::Walk<Point, Polytope, RandomNumberGenerator, NegativeGradientFunctor, NegativeLogprobFunctor, Solver>
using Opts = typename Polytope::Opts
using IVT = Eigen::Matrix<int, Eigen::Dynamic, 1>

Public Functions

inline Walk(Polytope &Problem, Point &p, NegativeGradientFunctor &neg_grad_f, NegativeLogprobFunctor &neg_logprob_f, parameters<NT, NegativeGradientFunctor> &param)
inline MT get_direction_with_momentum(unsigned int const &dim, RandomNumberGenerator &rng, MT const &x, MT v, NT momentum = 0, bool normalize = true)
inline MT getPoints()
inline Point getPoint()
inline MT masked_choose(MT &x, MT &x_tilde, IVT &accept)
inline void disable_adaptive()
inline NT get_current_eta() const
inline void apply(RandomNumberGenerator &rng, int walk_length = 1, bool metropolis_filter = true)

Public Members

parameters<NT, NegativeGradientFunctor> &params
std::unique_ptr<Solver> solver
unsigned int dim
Polytope &P
long total_discarded_samples = 0
long num_runs = 0
float discard_ratio = 0
float total_acceptance_prob = 0
float average_acceptance_prob = 0
VT prob
bool accepted
IVT accept
bool update_modules
int simdLen
MT x
MT v
MT x_tilde
MT v_tilde
NegativeGradientFunctor &F
std::unique_ptr<auto_tuner<Sampler, RandomNumberGenerator>> module_update
VT H
VT H_tilde
NegativeLogprobFunctor &f