![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
#include <quetzal/utils/random/TransitionKernel.hpp>
Discrete markovian transition kernel for sampling the next state knowing the present state \(x_0\).
Considering a Markov chain \((X_k)_{k\in Z_+}\) with discrete state space \(S\), and given each initial state \(x_0\) of \(S\), defines the markovian probability distribution \(P(X_1=\cdot|X_0=x_0)\), and samples the stochastic value \(X_1\), according to this probability law.
Distribution | type of the transition kernels. |
Public Types | |
using | state_type = typename Distribution::result_type |
Public Member Functions | |
TransitionKernel () | |
Default constructor. | |
TransitionKernel (state_type const &x, Distribution const &d) | |
Initialize a transition kernel with a state and its associated distribution. | |
TransitionKernel (state_type const &x, Distribution &&d) | |
Initialize a transition kernel with a state and its associated distribution. | |
TransitionKernel (const TransitionKernel &)=default | |
Copy constructor. | |
TransitionKernel (TransitionKernel &&)=default | |
Move constructor. | |
TransitionKernel< Distribution > & | operator= (const TransitionKernel< Distribution > &)=default |
Copy assignment operator. | |
TransitionKernel< Distribution > & | operator= (TransitionKernel< Distribution > &&)=default |
Move assignment operator. | |
TransitionKernel< Distribution > & | set (state_type const &x, Distribution const &d) |
Set a departure state and its associated distribution to the kernel. | |
TransitionKernel< Distribution > & | set (state_type const &x, Distribution &&d) |
Set a departure state and its associated distribution to the kernel. | |
bool | has_distribution (state_type const &x) const |
Checks if a probability distribution is associated to a departure state. | |
template<typename Generator > | |
state_type | operator() (Generator &g, state_type const &x) |
Sample an arrival state conditionnaly to departure state. | |
|
inline |
Initialize a transition kernel with a state and its associated distribution.
x | the departure state |
d | the probability distribution on the arrival state |
|
inline |
Initialize a transition kernel with a state and its associated distribution.
x | the departure state |
d | the probability distribution on the arrival state |
|
inline |
Checks if a probability distribution is associated to a departure state.
x | the departure state |
|
inline |
Sample an arrival state conditionnaly to departure state.
x | the departure state |
|
inline |
Set a departure state and its associated distribution to the kernel.
x | the departure state |
d | the probability distribution on the arrival state |
|
inline |
Set a departure state and its associated distribution to the kernel.
x | the departure state |
d | the probability distribution on the arrival state |