Namensräume
Varianten
Aktionen

std::discrete_distribution::discrete_distribution

Aus cppreference.com

 
 
Numerik-Bibliothek
Gemeinsame mathematischen Funktionen
Floating-Point-Umgebung
Komplexe Zahlen
Numerische Arrays
Pseudo-Zufallszahlen
Compile-time rationale Arithmetik (C++11)
Generische numerische Operationen
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
Pseudo-Zufallszahlen
Motoren und Adaptern
Original:
Engines and engine adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
linear_congruential_engine(C++11)
mersenne_twister_engine(C++11)
subtract_with_carry_engine(C++11)
discard_block_engine(C++11)
independent_bits_engine(C++11)
shuffle_order_engine(C++11)
Generatoren
Original:
Generators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
random_device(C++11)
Ausschüttungen
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Uniform-Distributionen
Original:
Uniform distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uniform_int_distribution(C++11)
uniform_real_distribution(C++11)
generate_canonical(C++11)
Bernoulli-Distributionen
Original:
Bernoulli distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bernoulli_distribution(C++11)
binomial_distribution(C++11)
negative_binomial_distribution(C++11)
geometric_distribution(C++11)
Poisson-Verteilungen
Original:
Poisson distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
poisson_distribution(C++11)
exponential_distribution(C++11)
gamma_distribution(C++11)
weibull_distribution(C++11)
extreme_value_distribution(C++11)
Normalverteilungen
Original:
Normal distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
normal_distribution(C++11)
lognormal_distribution(C++11)
chi_squared_distribution(C++11)
cauchy_distribution(C++11)
fisher_f_distribution(C++11)
student_t_distribution(C++11)
Sampling-Distributionen
Original:
Sampling distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution(C++11)
piecewise_constant_distribution(C++11)
piecewise_linear_distribution(C++11)
Seed-Sequenzen
Original:
Seed Sequences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
seed_seq(C++11)
C-Bibliothek
Original:
C library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rand
srand
RAND_MAX
 
std::discrete_distribution
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution::discrete_distribution
discrete_distribution::reset
Generation
Original:
Generation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution::operator()
Merkmale
Original:
Characteristics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution::probabilities
discrete_distribution::param
discrete_distribution::min
discrete_distribution::max
Non-Member-Funktionen
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator==
operator!=
operator<<
operator>>
 
discrete_distribution();
(1) (seit C++11)
template< class InputIt >
discrete_distribution( InputIt first, InputIt last );
(2) (seit C++11)
discrete_distribution( std::initializer_list<double> weights );
(3) (seit C++11)
template< class UnaryOperation >

discrete_distribution( std::size_t count, double xmin, double xmax,

                       UnaryOperation unary_op );
(4) (seit C++11)
explicit discrete_distribution( const param_type& params );
(2) (seit C++11)
Erzeugt eine neue Verteilung Objekt .
Original:
Constructs a new distribution object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Standardkonstruktor. Konstruiert die Verteilung mit Gewichten . Diese Verteilung wird immer erzeugt 0 .
Original:
Default constructor. Constructs the distribution with weights . This distribution will always generate 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Konstruiert die Verteilung mit Gewichten im Bereich [first, last). Wenn first == last, sind die Auswirkungen der gleiche wie der Standardkonstruktor .
Original:
Constructs the distribution with weights in the range [first, last). If first == last, the effects are the same as of the default constructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Konstruiert die Verteilung mit Gewichten in weights. Effektiv nennt initializer_list(weigths.begin(), weights.end()) .
Original:
Constructs the distribution with weights in weights. Effectively calls initializer_list(weigths.begin(), weights.end()).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Konstruiert die Verteilung mit count Gewichte, generiert mit der Funktion unary_op werden. Jedes der Gewichte gleich w
i
= unary_op(xmin + δ/2 + i · δ)
, wo δ =
(xmax − xmin)
count
und i ∈ {0, ..., count−1}. xmin und xmax muss, so dass δ > 0 sein. Wenn count == 0 die Wirkungen sind die gleichen wie des Standardkonstruktor .
Original:
Constructs the distribution with count weights that are generated using function unary_op. Each of the weights is equal to w
i
= unary_op(xmin + δ/2 + i · δ)
, where δ =
(xmax − xmin)
count
and i ∈ {0, ..., count−1}. xmin and xmax must be such that δ > 0. If count == 0 the effects are the same as of the default constructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Konstruiert die Verteilung mit params wie die Verteilungsparameter .
Original:
Constructs the distribution with params as the distribution parameters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Parameter

first, last -
das Spektrum der definierenden Elemente die Zahlen als Gewichte verwenden. Die Art der Elemente durch InputIterator vorgelegte konvertierbar sein double
Original:
the range of elements defining the numbers to use as weights. The type of the elements referred by InputIterator must be convertible to double
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
weights -
initializer Liste mit den Gewichten
Original:
initializer list containing the weights
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unary_op - unary operation function object that will be applied.

The signature of the function should be equivalent to the following:

 Ret fun(const Type &a);

The signature does not need to have const &.
The type  Type must be such that an object of type double can be dereferenced and then implicitly converted to  Type. The type  Ret must be such that an object of type double can be dereferenced and assigned a value of type  Ret. ​

params -
die Verteilung Parameter eingestellt
Original:
the distribution parameter set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Type requirements
-
InputIt must meet the requirements of InputIterator.