![]() |
Rosetta Utilities
2014.16.56682
|
#include <WeightedSampler.hh>
Public Member Functions | |
| WeightedSampler () | |
| Constructor. More... | |
| WeightedSampler (numeric::Size num_weights) | |
| Constructor. More... | |
| WeightedSampler (utility::vector1< numeric::Real > const &weights) | |
| Constructor. More... | |
| virtual | ~WeightedSampler () |
| Destructor. More... | |
| WeightedSampler (WeightedSampler const &) | |
| Copy constructor. More... | |
| WeightedSampler & | operator= (WeightedSampler const &) |
| Copy operator. More... | |
| utility::vector1 < numeric::Real > const & | weights () const |
| void | weights (utility::vector1< numeric::Real > const &weights) |
| void | add_weight (numeric::Real weight) |
| void | set_weight (numeric::Size weight_num, numeric::Real weight) |
| void | clear () |
| numeric::Size | size () const |
| void | resize (numeric::Size num_weights, numeric::Real default_weight=0) |
| numeric::Size | random_sample (numeric::Real randnum) |
| numeric::Size | random_sample (numeric::random::RandomGenerator &rg) |
Private Member Functions | |
| void | update_cumulative_distribution () |
Private Attributes | |
| utility::vector1< numeric::Real > | weights_ |
| utility::vector1< numeric::Real > | cumulative_distribution_ |
| bool | cumulative_distribution_valid_ |
| numeric::random::WeightedSampler::WeightedSampler | ( | ) |
Constructor.
| numeric::random::WeightedSampler::WeightedSampler | ( | numeric::Size | num_weights | ) |
Constructor.
| numeric::random::WeightedSampler::WeightedSampler | ( | utility::vector1< numeric::Real > const & | weights | ) |
Constructor.
|
virtual |
Destructor.
| numeric::random::WeightedSampler::WeightedSampler | ( | WeightedSampler const & | weighted_sampler | ) |
Copy constructor.
|
inline |
References cumulative_distribution_valid_, and weights_.
|
inline |
References cumulative_distribution_valid_, and weights_.
| WeightedSampler & numeric::random::WeightedSampler::operator= | ( | WeightedSampler const & | weighted_sampler | ) |
Copy operator.
References cumulative_distribution_, cumulative_distribution_valid_, and weights_.
| numeric::Size numeric::random::WeightedSampler::random_sample | ( | numeric::Real | randnum | ) |
References cumulative_distribution_, cumulative_distribution_valid_, and update_cumulative_distribution().
Referenced by random_sample().
| numeric::Size numeric::random::WeightedSampler::random_sample | ( | numeric::random::RandomGenerator & | rg | ) |
References random_sample(), and numeric::random::RandomGenerator::uniform().
|
inline |
References weights_.
|
inline |
|
inline |
References weights_.
|
private |
References cumulative_distribution_, cumulative_distribution_valid_, runtime_assert, and weights_.
Referenced by random_sample().
|
inline |
|
inline |
References cumulative_distribution_valid_, weights(), and weights_.
|
private |
Referenced by operator=(), random_sample(), and update_cumulative_distribution().
|
private |
Referenced by add_weight(), clear(), operator=(), random_sample(), set_weight(), update_cumulative_distribution(), and weights().
|
private |
Referenced by add_weight(), clear(), operator=(), resize(), set_weight(), size(), update_cumulative_distribution(), and weights().
1.8.7