|
Infinity Engine v0.6.20
C++ API Documentation
|
Parameter set for the distribution. More...
#include <PRNGDistribution.hpp>
Public Types | |
| using | distribution_type = PiecewiseConstantDistribution< RealType > |
Public Member Functions | |
| param_type () | |
| Default constructor. Creates uniform distribution over [0, 1). | |
| template<typename InputIteratorB , typename InputIteratorW > | |
| param_type (InputIteratorB first_b, InputIteratorB last_b, InputIteratorW first_w) | |
| Constructs from interval boundaries and density weights. | |
| template<typename UnaryOperation > | |
| param_type (std::initializer_list< RealType > bl, UnaryOperation fw) | |
| Constructs from interval boundaries and weight function. | |
| template<typename UnaryOperation > | |
| param_type (size_t nw, RealType xmin, RealType xmax, UnaryOperation fw) | |
| Constructs with evenly-spaced intervals and weight function. | |
| std::vector< RealType > | intervals () const |
| Returns the interval boundaries. | |
| std::vector< double > | densities () const |
| Returns the density values for each interval. | |
Public Attributes | |
| std::vector< RealType > | m_int |
| Interval boundaries. | |
| std::vector< double > | m_den |
| Normalized densities for each interval. | |
| std::vector< double > | m_cp |
| Cumulative probabilities for sampling. | |
Friends | |
| class | PiecewiseConstantDistribution< RealType > |
| bool | operator== (const param_type &lhs, const param_type &rhs) |
| bool | operator!= (const param_type &lhs, const param_type &rhs) |
Parameter set for the distribution.
Stores interval boundaries, density values, and cumulative probabilities for efficient sampling.
| using Infinity::Engine::PiecewiseConstantDistribution< RealType >::param_type::distribution_type = PiecewiseConstantDistribution<RealType> |
|
inline |
Default constructor. Creates uniform distribution over [0, 1).
|
inline |
Constructs from interval boundaries and density weights.
The density for interval i is given by the i-th weight. Weights are normalized automatically.
| InputIteratorB | Iterator type for boundaries |
| InputIteratorW | Iterator type for weights |
| first_b | Iterator to first boundary |
| last_b | Iterator past last boundary (n+1 boundaries for n intervals) |
| first_w | Iterator to first weight (n weights for n intervals) |
|
inline |
Constructs from interval boundaries and weight function.
Evaluates the weight function at the midpoint of each interval.
| UnaryOperation | Function type: RealType -> double |
| bl | Initializer list of interval boundaries |
| fw | Weight function evaluated at interval midpoints |
|
inline |
Constructs with evenly-spaced intervals and weight function.
Creates nw intervals of equal width between xmin and xmax, evaluating the weight function at each interval's midpoint.
| UnaryOperation | Function type: RealType -> double |
| nw | Number of intervals |
| xmin | Minimum boundary value |
| xmax | Maximum boundary value |
| fw | Weight function evaluated at interval midpoints |
|
inline |
Returns the density values for each interval.
|
inline |
Returns the interval boundaries.
|
friend |
|
friend |
|
friend |
| std::vector<double> Infinity::Engine::PiecewiseConstantDistribution< RealType >::param_type::m_cp |
Cumulative probabilities for sampling.
| std::vector<double> Infinity::Engine::PiecewiseConstantDistribution< RealType >::param_type::m_den |
Normalized densities for each interval.
| std::vector<RealType> Infinity::Engine::PiecewiseConstantDistribution< RealType >::param_type::m_int |
Interval boundaries.