beta#

ベータ分布のランダム値を生成します。

説明#

beta クラス・オブジェクトは、generate 関数で使用され、形状パラメーター q と、変位 a、スケール・パラメーター (b, β) を持つベータ分布の乱数を生成します。ここで、pqa、および \(\beta \in R ; p > 0, q > 0, \beta > 0\) です。

確率密度関数は次のように表されます。

\[\begin{split}f_{p, q, a, \beta} (x) = \begin{cases} \frac{1}{B(p, q) \beta^{p+q-1}} (x-a)^{p-1} (\beta + a - x)^{q-1}, & a \leq x < a + \beta \\ 0, & x < a, x \geq a + \beta \end{cases}, - \infty < x < \infty\end{split}\]

ここで B(p, q) は完全ベータ関数です。

累積分布関数は次のようになります。

\[\begin{split}f_{p, q, a, \beta} (x) = \begin{cases} 0, & x < a \\ \int_a^x \frac{1}{B(p, q) \beta^{p+q-1}} (y-a)^{p-1} (\beta + a - y)^{q-1}dy, & a \leq x < a + \beta \\ 1, & x \geq a + \beta \end{cases}, - \infty < x < \infty\end{split}\]

製品および性能に関する情報

性能は、使用状況、構成、およびその他の要因によって異なります。詳細は、https://www.intel.com/PerformanceIndex (英語) を参照してください。改訂 #20201201

API#

構文#

namespace oneapi::mkl::rng { 
  template<typename RealType = float, 
           typename Method = beta_method::by_default> 
  class beta { 
  public: 
    using method_type = Method; using result_type = RealType; 

    beta(): beta((RealType)1.0, (RealType)1.0, (RealType)(0.0), 
                 (RealType)(1.0)){} explicit beta(RealType p, 
                 RealType q, RealType a, RealType b); 
    explicit beta(const param_type& pt); 

    RealType p() const; 
    RealType q() const; 
    RealType a() const; 
    RealType b() const; 
    param_type param() const; 
    void param(const param_type& pt); 
  }; 
}

サポートされるデバイス: CPU と GPU。

インクルード・ファイル#

  • oneapi/mkl/rng.hpp

テンプレート・パラメーター#

typename RealType = float

生成された値のタイプ。固有の値は次のとおりです:

float

double

typename Method = oneapi::mkl::rng::beta_method::by_default

生成メソッド。固有の値は次のとおりです:

oneapi::mkl::rng::beta_method::cja

oneapi::mkl::rng::beta_method::cja_accurate

配布テンプレート・パラメーター・メソッドのメソッドの説明を参照してください。

入力パラメーター#

名前

タイプ

説明

p

RealType (float, double)

形状 p

q

RealType (float, double)

形状 q

a

RealType (float, double)

変位 a

b

RealType (float, double)

スケール係数 b