mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches

Defines a random number type. More...

Defines a random number type.

Author
Jared R. Males

Definition in file randomT.hpp.

#include <random>
#include "randomSeed.hpp"

Go to the source code of this file.

Classes

class  mx::math::randomT< typeT, _ranengT, _randistT >
 A random number type, which functions like any other arithmetic type. More...
class  mx::math::laplace_distribution< _RealType >
 The Laplace (double exponential) continuous distribution for random numbers. More...
struct  mx::math::laplace_distribution< _RealType >::param_type

Namespaces

namespace  mx
 The mxlib c++ namespace.

Typedefs

template<typename realT>
using mx::math::uniDistT = randomT<realT, std::mt19937_64, std::uniform_real_distribution<realT>>
 Alias for a uniform random variate.
template<typename realT>
using mx::math::normDistT = randomT<realT, std::mt19937_64, std::normal_distribution<realT>>
 Alias for a standard normal random variate.
template<typename realT>
using mx::math::expDistT = randomT<realT, std::mt19937_64, std::exponential_distribution<realT>>
 Alias for an exponential random variate.
template<typename realT>
using mx::math::lapDistT = randomT<realT, std::mt19937_64, laplace_distribution<realT>>
 Alias for a laplace random variate.
template<typename intT>
using mx::math::poissonDistT = randomT<intT, std::mt19937_64, std::poisson_distribution<intT>>
 Alias for a poisson random variate.
template<typename realT>
using mx::math::lognormDistT = randomT<realT, std::mt19937_64, std::lognormal_distribution<realT>>
 Alias for a log normal variate.

Functions

template<typename _RealType>
bool mx::math::operator== (const laplace_distribution< _RealType > &__d1, const laplace_distribution< _RealType > &__d2)
 Return true if two exponential distributions have the same parameters.
template<typename _RealType>
bool mx::math::operator!= (const laplace_distribution< _RealType > &__d1, const laplace_distribution< _RealType > &__d2)
 Return true if two exponential distributions have different parameters.
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & mx::math::operator<< (std::basic_ostream< _CharT, _Traits > &, const laplace_distribution< _RealType > &)
 Inserts a laplace_distribution random number distribution __x into the output stream __os.
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & mx::math::operator>> (std::basic_istream< _CharT, _Traits > &, laplace_distribution< _RealType > &)
 Extracts a laplace_distribution random number distribution __x from the input stream __is.

Function Documentation

◆ operator!=()

template<typename _RealType>
bool mx::math::operator!= ( const laplace_distribution< _RealType > & __d1,
const laplace_distribution< _RealType > & __d2 )

Return true if two exponential distributions have different parameters.

Definition at line 273 of file randomT.hpp.

◆ operator<<()

template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & mx::math::operator<< ( std::basic_ostream< _CharT, _Traits > & ,
const laplace_distribution< _RealType > &  )

Inserts a laplace_distribution random number distribution __x into the output stream __os.

Parameters
__osAn output stream.
__xA laplace_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.

◆ operator==()

template<typename _RealType>
bool mx::math::operator== ( const laplace_distribution< _RealType > & __d1,
const laplace_distribution< _RealType > & __d2 )

Return true if two exponential distributions have the same parameters.

Definition at line 263 of file randomT.hpp.

References mx::math::laplace_distribution< _RealType >::param().

◆ operator>>()

template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & mx::math::operator>> ( std::basic_istream< _CharT, _Traits > & ,
laplace_distribution< _RealType > &  )

Extracts a laplace_distribution random number distribution __x from the input stream __is.

Parameters
__isAn input stream.
__xA laplace_distribution random number generator engine.
Returns
The input stream with __x extracted or in an error state.