Docs
Toggle main menu visibility
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
47
class
Sampler
{
48
protected
:
49
// ========== Core Components ==========
50
53
Data
&
data
;
54
57
const
Likelihood
&
likelihood
;
58
61
Process
&
process
;
62
63
// ========== Random Number Generation ==========
64
67
std::random_device
rd
;
68
69
public
:
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.hpp
Data structure for managing point distances and cluster allocations.
Likelihood.hpp
Abstract base class for likelihood computation in clustering models.
Process.hpp
Abstract interface for Bayesian nonparametric processes.
Data
Manages distance matrices and cluster allocations for points.
Definition
Data.hpp:26
Likelihood
Abstract base class for likelihood computation.
Definition
Likelihood.hpp:26
Process
Abstract base class for Bayesian nonparametric processes.
Definition
Process.hpp:40
Sampler::likelihood
const Likelihood & likelihood
Reference to the likelihood computation object for evaluating cluster assignments.
Definition
Sampler.hpp:57
Sampler::~Sampler
virtual ~Sampler()=default
Virtual destructor for proper cleanup of derived classes.
Sampler::step
virtual void step()=0
Pure virtual method to perform one MCMC sampling step.
Sampler::data
Data & data
Reference to the data object containing observations and current allocations.
Definition
Sampler.hpp:53
Sampler::process
Process & process
Reference to the stochastic process object (DP, NGGP, DPW, NGGPW).
Definition
Sampler.hpp:61
Sampler::rd
std::random_device rd
Random device for generating random numbers across sampling algorithms.
Definition
Sampler.hpp:67
Sampler::Sampler
Sampler(Data &d, const Likelihood &l, Process &pr)
Constructor initializing sampler with required components.
Definition
Sampler.hpp:89
BNPClust
utils
Sampler.hpp
Generated by
1.17.0