std::chi_squared_distribution

Defined in header <random> template< class RealType = double > class chi_squared_distribution; (since C++11) The chi_squared_distribution produces random numbers x>0 according to the Chi-squared distribution: f(x;n) = x(n/2)-1 e-x/2 Γ(n/2) 2n/2 Γ is the Gamma function (See also std::tgamma) and n are the degrees of freedom (default 1). std::chi_squared_distribution satisfies all requirements of RandomNumberDistribution. Template parameters RealType - Th

std::chi_squared_distribution::max

result_type max() const; (since C++11) Returns the maximum value potentially generated by the distribution. Parameters (none). Return value The maximum value potentially generated by the distribution. Complexity Constant. See also min returns the minimum potentially generated value (public member function)

std::chi_squared_distribution::param

param_type param() const; (1) (since C++11) void param( const param_type& params ); (2) (since C++11) Manages the associated distribution parameter set. 1) Returns the associated parameter set. 2) Sets the associated parameter set to params. Parameters params - new contents of the associated parameter set Return value 1) The associated parameter set. 2) (none). Complexity Constant.

std::chi_squared_distribution::chi_squared_distribution

explicit chi_squared_distribution( RealType n = 1.0 ); (1) (since C++11) explicit chi_squared_distribution( const param_type& params ); (2) (since C++11) Constructs new distribution object. The first version uses n as the distribution parameter, the second version uses params as the distribution parameter. Parameters n - the n distribution parameter (degrees of freedom) params - the distribution parameter set

std::char_traits::eq_int_type

static bool eq_int_type( int_type c1, int_type c2 ); (until C++11) static constexpr bool eq_int_type( int_type c1, int_type c2 ); (since C++11) Checks whether two values of type int_type are equal. Parameters c1, c2 - values to compare Return value true if c1 is equal to c2, false otherwise. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant.

std::char_traits::find

static const char_type* find( const char_type* p, std::size_t count, const char_type& ch ); Searches for character ch within the first count characters of the sequence pointed to by p. Parameters p - pointer to a character string to search count - the number of characters to analyze ch - the character to search for Return value A pointer to the first character in the range specified by [p, p + count) that compares equal to ch, or NULL if not found. Except

std::char_traits::to_char_type

static char_type to_char_type( int_type c ); (until C++11) static constexpr char_type to_char_type( int_type c ); (since C++11) Converts a value of int_type to char_type. If there are no equivalent value, the results are unspecified. Parameters c - value to convert Return value A value equivalent to c. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant.

std::char_traits::move

static char_type* move( char_type* dest, const char_type* src, std::size_t count ); Copies count character from character string pointed to by src to character string pointed to by dest. Performs correctly even if the copied character ranges overlap, i.e. src is in [dest, dest + count). Parameters dest - pointer to a character string to copy to src - pointer to a character string to copy from count - the number of characters to copy Return value dest. Excepti

std::char_traits::to_int_type

static int_type to_int_type( char_type c ); (until C++11) static constexpr int_type to_int_type( char_type c ); (since C++11) Converts a value of char_type to int_type. Parameters c - value to convert Return value A value equivalent to c. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant.

std::char_traits::length

static std::size_t length( const char_type* s ); Returns the length of the character sequence pointed to by s, that is, the position of the terminating null character (CharT()). Parameters s - pointer to a character sequence to return length of Return value The length of character sequence pointed to by s. Exceptions (none). Complexity Linear. Example #include <iostream> void print(const char* str) { std::cout << "string '" << str <<