|
minimc 0.5.1
|
Like Map, but stores elements as the CDF of some random variable. Stores CDF values as keys so that std::map::upper_bound() can be used. More...
#include <ContinuousMap.hpp>


Public Member Functions | |
| CDF (typename ContinuousMap< Real, T >::elements_type &&other) | |
| Constructs a CDF from a std::map. | |
| const T & | Sample (RNG &rng) const noexcept |
| Samples a value from the CDF and returns the sampled key. | |
Public Member Functions inherited from ContinuousMap< Real, T > | |
| T | at (const Real k, Args... inner_keys) const noexcept |
| Returns a linearly interpolated value at the given key. More... | |
| T & | operator[] (const Real &k) |
| Returns a reference to the value at a given key. | |
Additional Inherited Members | |
Public Types inherited from ContinuousMap< Real, T > | |
| using | elements_type = std::map< Real, T > |
| Type used to store elements internally. | |
Protected Attributes inherited from ContinuousMap< Real, T > | |
| elements_type | elements |
| This class essentially wraps an STL container. | |
Like Map, but stores elements as the CDF of some random variable. Stores CDF values as keys so that std::map::upper_bound() can be used.
| T | The type of the random variable |