|
Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
|
#include <mixtureProposal.hpp>
Public Member Functions | |
| MixtureProposal (std::vector< const Proposal< dim > * > components, std::vector< double > weights) | |
| Construct a mixture proposal from non-owning component pointers and weights. | |
| mc::geom::Point< dim > | sample (std::mt19937 &rng) const override |
| Sample from the mixture. | |
| double | pdf (const mc::geom::Point< dim > &x) const override |
| Evaluate mixture PDF q(x) = sum_k w_k * q_k(x). | |
| std::size_t | numComponents () const noexcept |
| const std::vector< double > & | getWeights () const noexcept |
Public Member Functions inherited from mc::proposals::Proposal< dim > | |
| virtual | ~Proposal ()=default |
| Virtual destructor for proper cleanup. | |
Definition at line 36 of file mixtureProposal.hpp.
| mc::proposals::MixtureProposal< dim >::MixtureProposal | ( | std::vector< const Proposal< dim > * > | components, |
| std::vector< double > | weights | ||
| ) |
Construct a mixture proposal from non-owning component pointers and weights.
| components | Vector of non-null pointers to Proposal<dim> components (q_k). |
| weights | Vector of non-negative weights (w_k). Will be normalized to sum to 1. |
Requirements:
IMPORTANT: components are NOT owned by this class.
|
inlinenoexcept |
Definition at line 62 of file mixtureProposal.hpp.
|
inlinenoexcept |
Definition at line 61 of file mixtureProposal.hpp.
|
overridevirtual |
Evaluate mixture PDF q(x) = sum_k w_k * q_k(x).
Implements mc::proposals::Proposal< dim >.
|
overridevirtual |
Sample from the mixture.
Implements mc::proposals::Proposal< dim >.