fpmas 1.6
Public Types | Public Member Functions | List of all members
fpmas::random::Distribution< Distribution_t > Class Template Reference

#include <distribution.h>

Inheritance diagram for fpmas::random::Distribution< Distribution_t >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::random::Distribution< Distribution_t >:
Collaboration graph
[legend]

Public Types

typedef Distribution_t::result_type result_type
 

Public Member Functions

template<typename... Args>
 Distribution (Args... args)
 
template<typename Generator_t >
result_type operator() (Generator_t &generator)
 
result_type min () const override
 
result_type max () const override
 
virtual Distribution_t::result_type min () const=0
 
virtual Distribution_t::result_type max () const=0
 

Detailed Description

template<typename Distribution_t>
class fpmas::random::Distribution< Distribution_t >

Generic api::random::Distribution implementation.

The specified template parameter can be any distribution that satisfy the requirements of the C++ RandomNumberDistribution named requirement.

Template Parameters
Distribution_tpredefined C++ distribution, that must satisfy RandomNumberDistribution.

Member Typedef Documentation

◆ result_type

template<typename Distribution_t >
typedef Distribution_t::result_type fpmas::random::Distribution< Distribution_t >::result_type

Type of generated values.

Constructor & Destructor Documentation

◆ Distribution()

template<typename Distribution_t >
template<typename... Args>
fpmas::random::Distribution< Distribution_t >::Distribution ( Args...  args)
inline

Generic Distribution constructor.

Distribution_t is assumed to be constructible from the specified arguments.

Member Function Documentation

◆ operator()()

template<typename Distribution_t >
template<typename Generator_t >
result_type fpmas::random::Distribution< Distribution_t >::operator() ( Generator_t &  generator)
inline

Generates a random value from the input generator, according to the implemented random distribution.

Template Parameters
Generator_tRandom number generator (must satisfy UniformRandomBitGenerator)
Parameters
generatorrandom number generator
Returns
random value

◆ min()

template<typename Distribution_t >
result_type fpmas::random::Distribution< Distribution_t >::min ( ) const
inlineoverridevirtual

Returns the minimum value potentially generated by the distribution.

Returns
minimum generated value

Implements fpmas::api::random::Distribution< Distribution_t::result_type >.

◆ max()

template<typename Distribution_t >
result_type fpmas::random::Distribution< Distribution_t >::max ( ) const
inlineoverridevirtual

Returns the maximum value potentially generated by the distribution.

Returns
maximum generated value

Implements fpmas::api::random::Distribution< Distribution_t::result_type >.


The documentation for this class was generated from the following file: