![]() |
fpmas 1.6
|
#include <distribution.h>
Public Types | |
typedef T | result_type |
Public Member Functions | |
ConstantDistribution (const T &value) | |
template<typename Generator_t > | |
result_type | operator() (Generator_t &) |
result_type | min () const override |
result_type | max () const override |
virtual T | min () const =0 |
virtual T | max () const =0 |
A constant "random" distribution that always return the given value, with a probability P(value)=1
.
This is notably useful for graph builders such as fpmas::graph::DistributedClusteredGraphBuilder, when the outgoing edges count of each node must be constant and not random.
typedef T fpmas::random::ConstantDistribution< T >::result_type |
Type of generated values.
|
inline |
Generic ConstantDistribution constructor.
value | constant value of the distribution |
|
inline |
Always returns the same value.
Generator_t | Random number generator |
|
inlineoverridevirtual |
Returns the minimum value potentially generated by the distribution.
Implements fpmas::api::random::Distribution< T >.
|
inlineoverridevirtual |
Returns the maximum value potentially generated by the distribution.
Implements fpmas::api::random::Distribution< T >.