公共成員函式
<random>

std::student_t_distribution::reset

void reset();
重置分佈
重置分佈,以便該物件的後續使用不依賴於它已經產生的值。

如果此分佈類的庫實現產生獨立值,則此函式可能無效。

引數



返回值



示例

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

int main()
{
  std::default_random_engine generator;
  std::student_t_distribution<double> distribution(5.0);

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

  return 0;
}

可能的輸出
-0.105551
-0.619588


複雜度

常量。

另見