| 
    rippled
    
   | 
 
Invocable that returns random samples from a range according to a discrete distribution. More...
#include <random.h>

Public Member Functions | |
| Selector (RAIter first, RAIter last, std::vector< double > const &w, Generator &g) | |
| Constructor.   | |
| std::iterator_traits< RAIter >::value_type | operator() () | 
Private Attributes | |
| RAIter | first_ | 
| RAIter | last_ | 
| std::discrete_distribution | dd_ | 
| Generator | g_ | 
Invocable that returns random samples from a range according to a discrete distribution.
Given a pair of random access iterators begin and end, each call to the instance of Selector returns a random entry in the range (begin,end) according to the weights provided at construction.
Definition at line 62 of file src/test/csf/random.h.
| ripple::test::csf::Selector< RAIter, Generator >::Selector | ( | RAIter | first, | 
| RAIter | last, | ||
| std::vector< double > const & | w, | ||
| Generator & | g | ||
| ) | 
Constructor.
| first | Random access iterator to the start of the range | 
| last | Random access iterator to the end of the range | 
| w | Vector of weights of size list-first | 
| g | the pseudo-random number generator | 
Definition at line 75 of file src/test/csf/random.h.
| std::iterator_traits< RAIter >::value_type ripple::test::csf::Selector< RAIter, Generator >::operator() | ( | ) | 
Definition at line 90 of file src/test/csf/random.h.
      
  | 
  private | 
Definition at line 64 of file src/test/csf/random.h.
      
  | 
  private | 
Definition at line 64 of file src/test/csf/random.h.
      
  | 
  private | 
Definition at line 65 of file src/test/csf/random.h.
      
  | 
  private | 
Definition at line 66 of file src/test/csf/random.h.