A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/random/weibull_distribution/reset/ below:

public member function

<random>

std::weibull_distribution::reset

Reset distribution

Resets the distribution, so that subsequent uses of the object do not depend on values already produced by it.

This function may have no effect if the library implementation for this distribution class produces independent values.



Parameters None

Return value None

Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// weibull_distribution::reset
#include <iostream>
#include <random>

int main()
{
  std::default_random_engine generator;
  std::weibull_distribution<double> distribution(1.0,5.0);

  // print two independent values:
  std::cout << distribution(generator) << std::endl;
  distribution.reset();
  std::cout << distribution(generator) << std::endl;

  return 0;
}

Possible output:


Complexity Constant.

See also
weibull_distribution::(constructor)
Construct Weibull distribution (public member function)
weibull_distribution::param
Distribution parameters (public member function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4