次のようにdouble[]を使用してboost::random::discrete_distributionを初期化します。
boost::random::discrete_distribution<>* distribution(double* _distr)
{
return new boost::random::discrete_distribution<>(_distr);
}
ベクトルまたは静的サイズのテーブルを使用できることは知っていますが、_distrを書き直さずにそれを克服する方法はありますか?