最終更新日時(UTC):
が更新

履歴 編集

function
<random>

std::student_t_distribution::param(C++11)

param_type param() const;           // (1)
void param(const param_type& parm); // (2)

概要

  • (1) : 分布のパラメータを取得する
  • (2) : 分布のパラメータを設定する

#include <iostream>
#include <random>

int main()
{
  using dist_type = std::student_t_distribution<>;

  dist_type dist(1.0);

  // (1) パラメータを取得
  {
    dist_type::param_type param = dist.param();
  }

  // (2) パラメータを設定
  {
    dist_type::param_type param(1.0);
    dist.param(param);
  }
}

出力

バージョン

言語

  • C++11

処理系

参照