|
| | 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 values.
|
| |
| template<typename UnaryOperation > |
| | param_type (std::initializer_list< RealType > bl, UnaryOperation fw) |
| | Constructs from interval boundaries and density function.
|
| |
| template<typename UnaryOperation > |
| | param_type (size_t nw, RealType xmin, RealType xmax, UnaryOperation fw) |
| | Constructs with evenly-spaced intervals and density function.
|
| |
| std::vector< RealType > | intervals () const |
| | Returns the interval boundaries.
|
| |
| std::vector< double > | densities () const |
| | Returns the density values at boundaries.
|
| |
template<typename RealType = double>
struct Infinity::Engine::PiecewiseLinearDistribution< RealType >::param_type
Parameter set for the distribution.
Stores interval boundaries, density values at boundaries, slopes, and cumulative probabilities for efficient sampling.
template<typename RealType = double>
template<typename InputIteratorB , typename InputIteratorW >
Constructs from interval boundaries and density values.
Densities are specified at each boundary point (n+1 values for n intervals). The density function is linearly interpolated between boundaries.
- Template Parameters
-
| InputIteratorB | Iterator type for boundaries |
| InputIteratorW | Iterator type for density values |
- Parameters
-
| first_b | Iterator to first boundary |
| last_b | Iterator past last boundary (n+1 boundaries) |
| first_w | Iterator to first density value (n+1 densities) |
template<typename RealType = double>
template<typename UnaryOperation >
Constructs with evenly-spaced intervals and density function.
Creates nw intervals of equal width between xmin and xmax, evaluating the density function at each boundary point (nw+1 points).
- Template Parameters
-
| UnaryOperation | Function type: RealType -> double |
- Parameters
-
| nw | Number of intervals |
| xmin | Minimum boundary value |
| xmax | Maximum boundary value |
| fw | Density function evaluated at boundaries |