std::ratio_add

Defined in header <ratio> template< class R1, class R2 > using ratio_add = /* see below */; The alias template std::ratio_add denotes the result of adding two exact rational fractions represented by the std::ratio specializations R1 and R2. The result is a std::ratio specialization std::ratio<U, V>, such that given Num == R1::num * R2::den + R2::num * R1::den and Denom == R1::den * R2::den (computed without arithmetic overflow), U is std::ratio<Num, Denom>

std::rank

Defined in header <type_traits> template< class T > struct rank; (since C++11) If T is an array type, provides the member constant value equal to the number of dimensions of the array. For any other type, value is 0. Helper variable template template< class T > constexpr std::size_t rank_v = rank<T>::value; (since C++17) Inherited from std::integral_constant Member constants value [static] the number of dimensions of T or zero (publ

std::range_error

Defined in header <stdexcept> class range_error; Defines a type of object to be thrown as exception. It can be used to report range errors (that is, situations where a result of a computation cannot be represented by the destination type). The only standard library components that throw this exception are std::wstring_convert::from_bytes and std::wstring_convert::to_bytes. The mathematical functions in the standard library components do not throw this exception (mathematica

std::ratio

Defined in header <ratio> template< std::intmax_t Num, std::intmax_t Denom = 1 > class ratio; (since C++11) The class template std::ratio provides compile-time rational arithmetic support. Each instantiation of this template exactly represents any finite rational number as long as its numerator Num and denominator Denom are representable as compile-time constants of type std::intmax_t. In addition, Denom may not be zero and may not be equal to the most nega

std::random_device::min

static constexpr result_type min(); (since C++11) Returns the minimum value potentially generated by the random-number engine. Parameters (none). Return value The minimum potentially generated value. Complexity Constant. See also max [static] gets the largest possible value in the output range (public static member function)

std::random_shuffle

Defined in header <algorithm> template< class RandomIt > void random_shuffle( RandomIt first, RandomIt last ); (1) (until C++17)(deprecated in C++14) (2) template< class RandomIt, class RandomFunc > void random_shuffle( RandomIt first, RandomIt last, RandomFunc& r ); (until C++11) template< class RandomIt, class RandomFunc > void random_shuffle( RandomIt first, RandomIt last, RandomFunc&& r ); (since C++11) (until C++17)(deprecated in

std::random_device

Defined in header <random> class random_device; (since C++11) std::random_device is a uniformly-distributed integer random number generator that produces non-deterministic random numbers. std::random_device may be implemented in terms of an implementation-defined pseudo-random number engine if a non-deterministic source (e.g. a hardware device) is not available to the implementation. In this case each std::random_device object may generate the same number sequence. Member

std::random_device::max

static constexpr result_type max(); (since C++11) Returns the maximum value potentially generated by the random-number engine. Parameters (none). Return value The maximum potentially generated value. Complexity Constant. See also min [static] gets the smallest possible value in the output range (public static member function)

std::random_device::random_device

explicit random_device(const std::string& token = /*implementation-defined*/ ); (1) (since C++11) random_device(const random_device& ) = delete; (2) (since C++11) 1) Constructs a new std::random_device object, making use of the argument token, if provided, in implementation-defined manner. 2) The copy constructor is deleted: std::random_device is not copyable. Exceptions Throws an implementation-defined exceptions derived from std::exception on failure. Notes The

std::random_device::entropy

double entropy() const; (since C++11) Obtains an estimate of the random number device entropy, which is a floating-point value between min() and log2(max()+1). If the device has n states whose individual probabilities are P0,...,Pn-1, the device probability S is defined as. S = -Σn-1i=0Pilog(Pi). A deterministic random number generator (e.g. a pseudo-random engine) has entropy zero. Exceptions noexcept specification: noexcept Return value The value of the device entropy, or zero