Medusa  1.1
Coordinate Free Mehless Method implementation
randutils.hpp File Reference

Detailed Description

Utilities for randomization.

Definition in file randutils.hpp.

#include <medusa/Config.hpp>
#include <medusa/bits/utils/assert.hpp>
#include <medusa/bits/types/Range.hpp>
#include <random>
#include <chrono>
+ Include dependency graph for randutils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 mm
 Root namespace for the whole library.
 

Functions

unsigned int mm::get_seed ()
 Return a random seed. More...
 
template<typename T , typename URNG >
mm::random_choice (const Range< T > &elements, const Range< double > &weights, bool normed, URNG &generator)
 Overload for custom generator. More...
 
template<typename T >
mm::random_choice (const Range< T > &elements, const Range< double > &weights={}, bool normed=false)
 Randomly returns one of the specified elements with distribution according to given weights. More...