Classes | Functions
MakeWithRandomValues.hpp File Reference

Helper functions for data structures used in unit tests. More...

#include <complex>
#include <cstddef>
#include <limits>
#include <random>
#include "DataStructures/SpinWeighted.hpp"
#include "DataStructures/Variables.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/MakeWithValue.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Classes

class  UniformCustomDistribution< T >
 A uniform distribution function object which redirects appropriately to either the std::uniform_int_distribution or the std::uniform_real_distribution. This also provides a convenience constructor which takes a 2-element array for the bounds for either floating point or int distributions. More...
 

Functions

template<typename T , typename UniformRandomBitGenerator , typename RandomNumberDistribution >
void fill_with_random_values (const gsl::not_null< T *> data, const gsl::not_null< UniformRandomBitGenerator *> generator, const gsl::not_null< RandomNumberDistribution *> distribution) noexcept
 Fill an existing data structure with random values.
 
template<typename T , typename UniformRandomBitGenerator , typename RandomNumberDistribution >
make_with_random_values (const gsl::not_null< UniformRandomBitGenerator *> generator, const gsl::not_null< RandomNumberDistribution *> distribution) noexcept
 Make a fixed-size data structure and fill with random values. More...
 
template<typename ReturnType , typename T , typename UniformRandomBitGenerator , typename RandomNumberDistribution >
ReturnType make_with_random_values (const gsl::not_null< UniformRandomBitGenerator *> generator, const gsl::not_null< RandomNumberDistribution *> distribution, const T &used_for_size) noexcept
 Make a data structure and fill it with random values. More...
 
template<typename ReturnType , typename T , typename UniformRandomBitGenerator , typename RandomNumberDistribution >
ReturnType make_with_random_values (const gsl::not_null< UniformRandomBitGenerator *> generator, RandomNumberDistribution distribution, const T &used_for_size) noexcept
 Make a data structure and fill it with random values. More...
 

Detailed Description

Helper functions for data structures used in unit tests.