7 #ifndef SSMPACK_PROCESS_MEMORYLESS_HPP
8 #define SSMPACK_PROCESS_MEMORYLESS_HPP
15 #include <type_traits>
27 template <
typename TPDF,
typename TParamMap>
46 : cpdf_(std::move(cpdf)) {}
60 decltype(std::declval<TPDF>().
random()) rv;
71 template <
typename... Args>
72 auto random(
const Args &... args) -> decltype(std::declval<TPDF>().
random()) {
73 return cpdf_.random(args...);
85 template <
typename... Args>
87 const Args &... args) {
88 return cpdf_.likelihood(rv, args...);
102 template <
typename TPDF,
typename TParamMap>
103 Memoryless<TPDF, TParamMap>
111 #endif // SSMPACK_PROCESS_MEMORYLESS_HPP
Memoryless< TPDF, TParamMap > makeMemoryless(distribution::Conditional< TPDF, TParamMap > cpdf)
Convenient builder for Memoryless process.
Conditional distribution function.
auto random(const Args &...args) -> decltype(std::declval< TPDF >().random())
Sample from process.
distribution::Conditional< TPDF, TParamMap > & getCPDF()
Returns a reference to internal CPDF.
A Memoryless (independent/white) random process.
Memoryless(distribution::Conditional< TPDF, TParamMap > cpdf)
Constructor.
auto initialize() -> decltype(std::declval< TPDF >().random())
initialize process
double likelihood(const decltype(std::declval< TPDF >().random())&rv, const Args &...args)
Calculate likelihood.