bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::maths::stats::UniformDist< OutType > Class Template Reference

#include <uniform_distribution.h>

Public Types

using out_type = OutType
using range_type = std::pair<out_type, out_type>

Public Member Functions

 UniformDist (out_type a, out_type b)
 Construct with [a, b].
 UniformDist (range_type range)
 Construct with [a, b].
out_type sample ()
 Get a sample.
out_type sample (uint_t seed)
 Get a sample.
range_type range () const

Detailed Description

template<typename OutType>
class bitsim::maths::stats::UniformDist< OutType >

Produces random integer values i, uniformly distributed on the closed interval [a,b], that is, distributed according to the discrete probability function

Member Typedef Documentation

◆ out_type

template<typename OutType>
using bitsim::maths::stats::UniformDist< OutType >::out_type = OutType

◆ range_type

template<typename OutType>
using bitsim::maths::stats::UniformDist< OutType >::range_type = std::pair<out_type, out_type>

Constructor & Destructor Documentation

◆ UniformDist() [1/2]

template<typename OutType>
bitsim::maths::stats::UniformDist< OutType >::UniformDist ( out_type a,
out_type b )

Construct with [a, b].

◆ UniformDist() [2/2]

template<typename OutType>
bitsim::maths::stats::UniformDist< OutType >::UniformDist ( range_type range)

Construct with [a, b].

Member Function Documentation

◆ range()

template<typename OutType>
range_type bitsim::maths::stats::UniformDist< OutType >::range ( ) const
inline

returns the [a, b] range

◆ sample() [1/2]

template<typename OutType>
UniformDist< OutType >::out_type bitsim::maths::stats::UniformDist< OutType >::sample ( )

Get a sample.

◆ sample() [2/2]

template<typename OutType>
UniformDist< OutType >::out_type bitsim::maths::stats::UniformDist< OutType >::sample ( uint_t seed)

Get a sample.


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