Docs
Loading...
Searching...
No Matches
Sampler.hpp
Go to the documentation of this file.
1
13
14#pragma once
15
16#include "Data.hpp"
17#include "Likelihood.hpp"
18#include "Process.hpp"
19
20#include <Eigen/Dense>
21#include <random>
22
47class Sampler {
48protected:
49 // ========== Core Components ==========
50
54
58
62
63 // ========== Random Number Generation ==========
64
67 std::random_device rd;
68
69public:
70 // ========== Constructor ==========
71
89 Sampler(Data &d, const Likelihood &l, Process &pr) : data(d), likelihood(l), process(pr) {};
90
91 // ========== Pure Virtual Interface ==========
92
116 virtual void step() = 0;
117
121 virtual ~Sampler() = default;
122};
Data structure for managing point distances and cluster allocations.
Abstract base class for likelihood computation in clustering models.
Abstract interface for Bayesian nonparametric processes.
Manages distance matrices and cluster allocations for points.
Definition Data.hpp:26
Abstract base class for likelihood computation.
Definition Likelihood.hpp:26
Abstract base class for Bayesian nonparametric processes.
Definition Process.hpp:40
const Likelihood & likelihood
Reference to the likelihood computation object for evaluating cluster assignments.
Definition Sampler.hpp:57
virtual ~Sampler()=default
Virtual destructor for proper cleanup of derived classes.
virtual void step()=0
Pure virtual method to perform one MCMC sampling step.
Data & data
Reference to the data object containing observations and current allocations.
Definition Sampler.hpp:53
Process & process
Reference to the stochastic process object (DP, NGGP, DPW, NGGPW).
Definition Sampler.hpp:61
std::random_device rd
Random device for generating random numbers across sampling algorithms.
Definition Sampler.hpp:67
Sampler(Data &d, const Likelihood &l, Process &pr)
Constructor initializing sampler with required components.
Definition Sampler.hpp:89