std::binary_function

Defined in header <functional> template< class Arg1, class Arg2, class Result > struct binary_function; (until C++17)(deprecated since c++11) binary_function is a base class for creating function objects with two arguments. binary_function does not define operator(); it is expected that derived classes will define this. binary_function provides only three types - first_argument_type, second_argument_type and result_type - defined by the template parameter

std::bernoulli_distribution::reset

void reset(); (since C++11) Resets the internal state of the distribution object. After a call to this function, the next call to operator() on the distribution object will not be dependent on previous calls to operator(). Parameters (none). Return value (none). Complexity Constant.

std::bernoulli_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::bernoulli_distribution::p

double p() const; (since C++11) Returns the p parameter the distribution was constructed with. It defines the probability of generating true. The default value is 0.5. Parameters (none). Return value Floating point value identifying the p distribution parameter. See also param gets or sets the distribution parameter object (public member function)

std::bernoulli_distribution::min

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

std::bernoulli_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::bernoulli_distribution::bernoulli_distribution

explicit bernoulli_distribution( double p = 0.5 ); (1) (since C++11) explicit bernoulli_distribution( const param_type& params ); (2) (since C++11) Constructs new distribution object. The first version uses p as the distribution parameter, the second version uses params as the distribution parameter. Parameters p - the p distribution parameter (probability of generating true) params - the distribution parameter set

std::bernoulli_distribution

Defined in header <random> class bernoulli_distribution; (since C++11) Produces random boolean values, according to the discrete probability function. The probability of true is P(b|p) = ⎧⎨⎩p if b == true 1 − p if b == false std::bernoulli_distribution satisfies RandomNumberDistribution. Member types Member type Definition result_type bool param_type the type of the parameter set, see RandomNumberDistribution. Member functions (constructor) cons

std::begin(std::valarray)

template< class T > /*unspecified1*/ begin( valarray<T>& v ); (1) (since C++11) template< class T > /*unspecified2*/ begin( const valarray<T>& v ); (2) (since C++11) The overload of std::begin for valarray returns an iterator of unspecified type referring to the first element in the numeric array. 1) The return type meets the requirements of mutable RandomAccessIterator. 2) The return type meets the requirements of constant RandomAccessIterator.

std::begin(std::initializer_list)

template< class E > const E* begin( initializer_list<E> il ); (since C++11) (until C++14) template< class E > constexpr const E* begin( initializer_list<E> il ); (since C++14) The overload of std::begin for initializer_list returns a pointer to the first element of il. Parameters il - an initializer_list Return value il.begin(). Exceptions noexcept specification: noexcept Example #include <iostream> #include <initializer_l